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
2 answers

Redrawing a UIView with a fade animation?

In TwUI, there is a method called redraw on TUIView. It forces the view to redraw, but it also comes with a free fading animation between the old and new state of the view. I'm wondering if something like that is possible in a normal UIView.…
sudo rm -rf
  • 29,408
  • 19
  • 102
  • 161
19
votes
4 answers

Does storyboard eliminate the need for .nib

With the introduction of storyboard, I wouldn't select to create a .xib/.nib when I create a subclass of UIViewController, because I can just drag out a viewcontroller in interface builder and assign it to the new class. So, with storyboard, when…
William Sham
  • 12,849
  • 11
  • 50
  • 67
19
votes
4 answers

How to detect iphone is on silent mode

I am developing an application. In that i want to detect through coding that "is iPhone on silent mode or not?". I am developing it by using cocoa with Objective-C. If anyone knows it kindly reply.
Jyotsna
  • 4,021
  • 4
  • 22
  • 25
19
votes
6 answers

Change the height of NavigationBar and UIBarButtonItem elements inside it in Cocoa Touch

I suppose it's not strictly in line with Apple guidelines but I guess it must be possible somehow. I'd like to change the height of navigation bar inside UINavigationController and the height of UIBarButtonItem elements inside that bar. Using a…
mgamer
  • 13,580
  • 25
  • 87
  • 145
19
votes
8 answers

Better performance with libxml2 or NSXMLParser on the iPhone?

I'm curious what your solution is for high performance XML parsing on the iPhone is, given its limited amount of CPU power. I have reviewed the XML Performance App that Apple provides as a demonstration, and it seems that for the data feed (300…
anon
19
votes
3 answers

What's the difference between sending -release or -drain to an Autorelease Pool?

In many Books and on many Sites I see -drain. Well, for an Autorelease Pool that sounds cool. But does it do anything other than an release? I would guess -drain just makes the Pool to -release all it's objects, without releasing the Pool itself.…
Thanks
  • 40,109
  • 71
  • 208
  • 322
19
votes
1 answer

How to display the iPhone/iPad keyboard over a full screen OpenGL ES app

I'm working on an app that at some point requires keyboard input. My app uses OpenGL ES for display, and I have my own graphics framework that can display a text field, and knows how to manage the cursor and render text. This code works great on…
Miguel Grinberg
  • 65,299
  • 14
  • 133
  • 152
19
votes
4 answers

Convert points from image to UIImageView points, contentMode-aware

Let's say I have an image (e.g. 1024 x 768 px) which is displayed in a UIImageView (e.g. 300 x 300 px). Now, I'd like to convert a point from the image, e.g. the position of a person's nose (x: 500, y:600), to the corresponding point on the…
nubbel
  • 1,552
  • 17
  • 24
19
votes
3 answers

How to draw a line with Cocos2d-iPhone

I'm trying to get to grips with Cocos2d by trying to accomplish simple things. At this point, I have a scene, that scene has a background sprite, and a Layer. I'm trying to draw onto the Layer using drawLine. Here's my current attempt.…
gargantuan
  • 8,888
  • 16
  • 67
  • 108
19
votes
4 answers

Get index of object in array to look up corresponding object in other array

I have two arrays. One is an array of names and the other is an array made up of strings titled "Yes" or "No". The index path of each name in the "name" array corresponds with the same index path in the "Yes/No" array. For example: Names Array |…
Preston
  • 1,039
  • 3
  • 12
  • 22
19
votes
2 answers

UITableView header/footer font color

When overriding the header/footer of a (group styled) table view, what colour should be used for the header and footer fonts to ensure the header and footer fonts are consistent with the standard header and footer fonts? ie The header is being…
Jay
  • 19,649
  • 38
  • 121
  • 184
19
votes
4 answers

How to cancel UIGestureRecognizer if subview's button pressed

I am struggling to get the behaviour I would like from the gesture recognisers, specifically cancelling certain gestures if others have fired. I have a scrollView set to paging and multiple subviews in each page. I have added a touch gesture…
Magic Bullet Dave
  • 9,006
  • 10
  • 51
  • 81
19
votes
3 answers

How can I make my UIPickerView show labels after the selected value?

Right now, the selecter just shows the data being selected. I want it to have a word after the selected value, the same way the iPhone clock app has "hours" and "min" at the selector.
user594161
19
votes
3 answers

Grand Central Dispatch vs. NSThread

I created some test code for NSThread and Grand Central Dispatch (GCD): - (void)doIt:(NSNumber *)i { sleep(1); NSLog(@"Thread#%i", [i intValue]); } - (IBAction)doWork:(id)sender { for (int i = 0; 10 > i; i++) { NSNumber *t = [NSNumber…
CarlJ
  • 9,461
  • 3
  • 33
  • 47
19
votes
7 answers

NSInternalInconsistencyException Could not load nib in bundle

I've created an application for child game. It loads 12 different questions for each round. After the 4th round the app crashes with the following log: ImageIO: CGImageRead_mapData 'open' failed…
Crazy Developer
  • 3,464
  • 3
  • 28
  • 62