Top "Objective-c" questions

This tag should be used only on questions that are about Objective-C features or depend on code in the language.

Objective-C and Swift URL encoding

I have a NSString like this: http://www. but I want to transform it to: http%3A%2F%2Fwww. How …

ios objective-c swift nsstring urlencode
Objective-C: Extract filename from path string

When I have NSString with /Users/user/Projects/thefile.ext I want to extract thefile with Objective-C methods. What is …

objective-c cocoa
What is the difference between Modal and Push segue in Storyboards?

Can someone explain to me what is the exact difference between modal and push segue? I know that when we …

ios objective-c swift storyboard
Swift performSelector:withObject:afterDelay: is unavailable

I have an app in Objective C that I'm transitioning to Swift. In Objective C, I have this method: [self.…

ios objective-c swift xcode6
How to copy an object in Objective-C

I need to deep copy a custom object that has objects of its own. I've been reading around and am …

objective-c copy
filtering NSArray into a new NSArray in Objective-C

I have an NSArray and I'd like to create a new NSArray with objects from the original array that meet …

objective-c cocoa nsarray
Compiler error: "initializer element is not a compile-time constant"

When compiling this code, I get the error "initializer element is not a compile-time constant". Can anyone explain why? #import "…

objective-c cocoa initialization compiler-errors global-variables
How to pass object with NSNotificationCenter

I am trying to pass an object from my app delegate to a notification receiver in another class. I want …

objective-c swift cocoa-touch nsnotificationcenter nsnotifications
Switching to a TabBar tab view programmatically?

Let's say I have a UIButton in one tab view in my iPhone app, and I want to have it …

iphone objective-c ios uitabbarcontroller
"Application tried to present modally an active controller"?

I just came across a crash showing a NSInvalidArgumentException with this message on an app which wasn't doing this before. …

objective-c ios ios5