Questions tagged [cocoa-touch]

The Cocoa Touch Frameworks that drive iOS apps share many proven patterns found on the Mac, but were built with a special focus on touch-based interfaces and optimization.

Cocoa Touch is Apple's application-development framework for , consisting of Foundation, UIKit (), and Core Data ().

The Cocoa Touch frameworks that drive apps share many proven patterns found on the , but were built with a special focus on touch-based interfaces and optimization.

For development, see .

For Cocoapods, see .

Many Cocoa Touch questions deal with , , , or .

Debugging techniques

Cocoa programs can be debugged with many techniques and tools, both general and specific to , , , and .

Apple's Technical Note about debugging iOS applications

34585 questions
19
votes
8 answers

iPhone Simulator - set HTTP proxy

I'm coding an iPhone app that needs to make small HTTP requests to the Internet. Within our corp LAN, all HTTP traffic has to go through Squid. The simulator is clearly capable of using a proxy - since Mobile Safari works. But, how do I get/set the…
Dan Bennett
  • 1,450
  • 1
  • 15
  • 17
19
votes
2 answers

Does NSSet use hash to define uniqueness?

I've been working under the assumption that NSSet used hash to look up potential matches, and then called isEqual on each of those to check for real collisions, but I realized that I can't find any evidence to back this up. The reason I bring it up…
DougW
  • 28,776
  • 18
  • 79
  • 107
19
votes
4 answers

Using xib object inside another xib

I'm designing using IB a specific button (with some labels,and imageView and other stuff). I would like then to use that xib object (the button) in another xib, where I have 6 objects of that button. I know I can do that programmatically using the…
Idan
  • 5,717
  • 10
  • 47
  • 84
19
votes
8 answers

How to change the text color on UINavigationBar button items

I've got a UINavigationController and i've changed it to white using the Tint property of the navigation bar in Interface Builder. But the text in buttons and the title is still the default color, white, and so gets lost against the white…
Lawrence
  • 10,142
  • 5
  • 39
  • 51
19
votes
4 answers

UITableView background color does not change

In a model UIViewController I have the following implementation of loadView (everything is created programmatically): - (void)loadView { // Add Basic View UIView *myView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 540, 620)]; …
Robin
  • 8,197
  • 11
  • 45
  • 74
19
votes
2 answers

How do I efficiently update a UITableView with Animation?

My iPad app features a UITableView populated from a feed. Like most RSS readers, it displays a list of links to blog posts in reverse chronological order, with their titles and a summary of each post. The feed updates frequently, and is quite large,…
theory
  • 9,178
  • 10
  • 59
  • 129
19
votes
6 answers

Getting the UITouch objects for a UIGestureRecognizer

Is there a way to get the UITouch objects associated with a gesture? UIGestureRecognizer doesn't seem to have any methods for this.
Morrowless
  • 6,856
  • 11
  • 51
  • 81
19
votes
1 answer

Counterpart to -application:openURL:sourceApplication:annotation:

iOS SDK 4.2 includes a new UIApplicationDelegate method called application:openURL:sourceApplication:annotation:. It is a replacement for application:handleOpenURL: and offers more information about the calling application: not only do we get the…
Ole Begemann
  • 135,006
  • 31
  • 278
  • 256
19
votes
3 answers

My custom UI elements are not being updated while UIScrollView is scrolled

I have a spinning circle UI element that is updated by an NSTimer. I also have a UIScrollView that would 'block' the spinning circle while being scrolled. That was expected, because the timer and the scroll view where both in the same thread. So I…
Sebastian
  • 904
  • 1
  • 8
  • 16
19
votes
2 answers

iOS API detect wireless networks

Is there an API in CocoaTouch/iOS for detecting wireless networks? I want to write an app that saves a list of networks the phone can see at a given moment.
Andrew J. Brehm
  • 4,448
  • 8
  • 45
  • 70
19
votes
2 answers

swift: issue in converting string to double

Here is a simple code in Xcode 7.3.1 playground: var str = "8.7" print(Double(str)) the output is suprising: Optional(8.6999999999999993) also, Float(str) gives: 8.69999981 Any thoughts or reasons on this guys? Any references to this would be…
v-i-s-h-a-l
  • 446
  • 4
  • 15
19
votes
3 answers

@property for int type?

Just a quick question if I may, I have always (since learning obj-c) written int properties as follows... @property(nonatomic, assign) int myValue; I am now thinking that this might be overkill and I might as well write... @property int…
fuzzygoat
  • 26,573
  • 48
  • 165
  • 294
19
votes
2 answers

is it possible to save NSMutableArray or NSDictionary data as file in iOS?

I want to save an NSMutableArray or NSDictionary as a permanent file. Then, I would like to reopen the file later. Is this possible? If so, how can I do it?
RAGOpoR
  • 8,118
  • 19
  • 64
  • 97
19
votes
5 answers

check if NSNumber is empty

How do I check if a NSNumber object is nil or empty? OK nil is easy: NSNumber *myNumber; if (myNumber == nil) doSomething But if the object has been created, but there is no value in it because an assignment failed, how can I check this? Use…
testing
  • 19,681
  • 50
  • 236
  • 417
19
votes
11 answers

Clicking on UITextField in a UITableViewCell

I have an issue where when a textField is clicked on in a UITableViewCell, the method tableView:didSelectRowAtIndexPath: does not get invoked. The problem is, I need to scroll my tableView into proper position, otherwise the keyboard goes right over…
Coocoo4Cocoa
  • 48,756
  • 50
  • 150
  • 175
1 2 3
99
100