iOS Development is easy with XCode, Swift3, UITableView, cocatouch, let's build iPhone, iPad and Macbook Applications.

UINavigationBar's drawRect is not called in iOS 5.0

I’ve overrided(placed in category, or swizzled) UINavigationBar’s drawRect to show custom background. In iOS 5 it’s not working. What should I do?

Phonegap CDVViewController.h file not found when Archiving for iOS

I’m currently using Phonegap 2.0 to develop an iOS App in XCode. The app builds and runs fine in the emulator and also on the testing devices. The problem appears when I try to archive the app for distribution. The archive fails with the following message: CDVViewController.h file not found. Any ideas?

iOS (iPhone, iPad, iPodTouch) view real-time console log terminal

Is there a way to view the real-time console log to view NSLog and other debug messages in a real-time manner, such as adb logcat?

How to make a call programmatically?

I need to call programmatically in my app in a button click. for that i found code like this. [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@”tel:1-800-555-1212″]]; Is it work in iphone sdk 3.0 and iphone 2.0 also Can any pls help Thank u in advance.

iOS 8 – Can't Install Enterprise App

Our company has an app that can be downloaded through a website using Enterprise Distribution. In iOS 8 Beta 5, tapping the download link brings up the expected pop-up “(website) would like to install (App Name)”. Tapping ‘install’ on that dialog first causes the app to get stuck “Waiting…” Until it finally indicates: “Unable to […]

Foreign key relationship mapping with RestKit

I’m totally new to RestKit and am struggling somewhat. JSON: { “teams”: [ { “id”: 1, “name”: “Team A” }, { “id”: 2, “name”: “Team B” } ], “users”: [ { “id”: 1, “name”: “cameron”, “teamId”: 1 }, { “id”: 2, “name”: “paul”, “teamId”: 2 } ] } CoreData: @interface Team : NSManagedObject @property (nonatomic, […]

Navigation controller custom transition animation

I’ve been following some tutorials to create custom animation while transitioning from one view to another. My test project using custom segue from here works fine, but someone told me it’s not encouraged anymore to do custom animation within a custom segue, and I should use UIViewControllerAnimatedTransitioning. I followed several tutorials that make use of […]

Dismissing a Presented View Controller

I have a theoretic question. Now İ’m reading Apple’s ViewController guide. They wrote: When it comes time to dismiss a presented view controller, the preferred approach is to let the presenting view controller dismiss it. In other words, whenever possible, the same view controller that presented the view controller should also take responsibility for dismissing […]

Should I declare variables in interface or using property in objective-c arc?

approach 1: @interface MyController : UIViewController { UILabel *myText; } @property (nonatomic, strong) UILabel *myText; approach 2: @interface MyController : UIViewController @property (nonatomic, strong) UILabel *myText; approach 3: @interface MyController : UIViewController { UILabel *myText; } I have read some articles talking about this kind of stuff but I still do not really realize which […]

Convert array to JSON string in swift

How do you convert an array to a JSON string in swift? Basically I have a textfield with a button embedded in it. When button is pressed, the textfield text is added unto the testArray. Furthermore, I want to convert this array to a JSON string. This is what I have tried: func addButtonPressed() { […]