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
251
votes
5 answers

compilation warning: no rule to process file for architecture i386

How can I resolve this warning? [WARN]warning: no rule to process file '$(PROJECT_DIR)/MyApp/MessageCell.h' of type sourcecode.objj.h for architecture i386
Sheehan Alam
  • 60,111
  • 124
  • 355
  • 556
250
votes
12 answers

Case insensitive comparison NSString

Can anyone point me to any resources about case insensitive comparison in Objective C? It doesn't seem to have an equivalent method to str1.equalsIgnoreCase(str2)
Tejaswi Yerukalapudi
  • 8,987
  • 12
  • 60
  • 101
247
votes
13 answers

How to compare two NSDates: Which is more recent?

I am trying to achieve a dropBox sync and need to compare the dates of two files. One is on my dropBox account and one is on my iPhone. I came up with the following, but I get unexpected results. I guess I'm doing something fundamentally wrong when…
n.evermind
  • 11,944
  • 19
  • 78
  • 122
246
votes
12 answers

Simulator slow-motion animations are now on?

A while ago I was experimenting, trying to see if i could get navigation items to animate and scroll between each other. I don't know if this is related but suddenly without touching the simulator options I'm getting this message Simulator…
Jules
  • 7,568
  • 14
  • 102
  • 186
246
votes
20 answers

Swipe to Delete and the "More" button (like in Mail app on iOS 7)

How to create a "more" button when user swipe a cell in table view (like mail app in ios 7) I have been looking for this information both here and in the Cocoa Touch forum, but I cannot seem to find the answer and I am hoping someone smarter than…
Guy Kahlon
  • 4,510
  • 4
  • 30
  • 41
246
votes
33 answers

Delete/Reset all entries in Core Data?

Do you know of any way to delete all of the entries stored in Core Data? My schema should stay the same; I just want to reset it to blank. Edit I'm looking to do this programmatically so that a user can essentially hit a reset button.
Michael Grinich
  • 4,770
  • 8
  • 29
  • 30
245
votes
10 answers

UILabel Align Text to center

How do I align text in UILabel?
vivianaranha
  • 2,781
  • 6
  • 33
  • 47
244
votes
23 answers

How to load a UIView using a nib file created with Interface Builder

I'm trying to do something a bit elaborate, but something that should be possible. So here is a challenge for all you experts out there (this forum is a pack of a lot of you guys :) ). I'm creating a Questionnaire "component", which I want to load…
Gonso
243
votes
11 answers

How can I send mail from an iPhone application

I want to send an email from my iPhone application. I have heard that the iOS SDK doesn't have an email API. I don't want to use the following code because it will exit my application: NSString *url = [NSString stringWithString:…
Khushi
  • 3,119
  • 6
  • 25
  • 14
241
votes
16 answers

Save string to the NSUserDefaults?

How to save a string into the NSUserDefaults?
Shishir.bobby
  • 10,994
  • 21
  • 71
  • 100
238
votes
6 answers

Obtain Bundle Identifier programmatically

How can I obtain a string of the Bundle Identifier programmatically from within my App?
user973984
  • 2,804
  • 2
  • 15
  • 13
238
votes
8 answers

iPhone - Get Position of UIView within entire UIWindow

The position of a UIView can obviously be determined by view.center or view.frame etc. but this only returns the position of the UIView in relation to it's immediate superview. I need to determine the position of the UIView in the entire 320x480…
adam
  • 22,404
  • 20
  • 87
  • 119
234
votes
17 answers

Change font size of UISegmentedControl

Can anyone please tell me how can I change the font type and size of UISegmentedControl?
Aashutosh Tiwari
  • 2,361
  • 2
  • 15
  • 5
233
votes
12 answers

Making the iPhone vibrate

How can the iPhone be set to vibrate once? For example, when a player loses a life or the game is over, the iPhone should vibrate.
some_id
  • 29,466
  • 62
  • 182
  • 304
233
votes
37 answers

Move textfield when keyboard appears swift

I'm using Swift for programing with iOS and I'm using this code to move the UITextField, but it does not work. I call the function keyboardWillShow correctly, but the textfield doesn't move. I'm using autolayout. override func viewDidLoad() { …
Pedro Manfredi
  • 3,768
  • 5
  • 19
  • 24