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

Swift GET request with parameters

I’m very new to swift, so I will probably have a lot of faults in my code but what I’m trying to achieve is send a GET request to a localhost server with paramters. More so I’m trying to achieve it given my function take two parameters baseURL:string,params:NSDictionary. I am not sure how to combine […]

How do I create a round cornered UILabel on the iPhone?

Is there a built in way to create round-cornered UILabels? If the answer is no, how would one go about creating such an object?

Dismiss keyboard on touch anywhere outside UITextField

I am developing an iPad app that has a large number of UIViewControllers, UITableViews (with cells with accessoryViews of UITextFields) etc, etc. Many of the UIViewControllers appear within a navigation hierarchy. There are many different places where UITextFields appear, including as UITableViewCell accessoryViews. I would like to devise an efficient strategy for dismissing the keyboard […]

UIModalTransitionStylePartialCurl doesn't get back to previous state. (Not dismissing)

I’ve got 2 view controllers, let’s say A and B. In A, I’m calling B to be shown with transition style UIModalTransitionStylePartialCurl [b setModalTransitionStyle:UIModalTransitionStylePartialCurl]; [self presentModalViewController:b animated:YES]; It is working fine. However when I press the curled area in the program compiled with iOS 4.3. It does not dismiss at all. It doesn’t get back […]

How to use NSURLSessionDataTask in Swift

Can someone help me? I can’t find a good example for the completion syntax. var url : NSURL = NSURL.URLWithString(“https://itunes.apple.com/search?term=\(searchTerm)&media=software”) var request: NSURLRequest = NSURLRequest(URL:url) let config = NSURLSessionConfiguration.defaultSessionConfiguration() let session = NSURLSession.sessionWithConfiguration(config) NSURLSessionDataTask(session.dataTaskWithRequest(request, completionHandler: ((NSData!, NSURLResponse!, NSError!) -> Void)?) Thanks!

How to download file in swift?

I just started learning apple swift programming for iOS coming from android. I basically can now read and manipulate swift code and also learned some common classes used in iOS swift programming but still having some confusion with the syntax and everything. I’m trying to download file. Like, lets just say coming from this URL […]

Choosing the right IOS XML parser

There are a million different XML parsers for the iPhone. I have a medium sized XML file that contains alot of duplicate tags (at different points in the hierarchy). I was thinking about TBXML but I was concerned about its lack of XPath support. For instance lets say my XML file looked like this. <blog> […]

Behaviour for significant change location API when terminated/suspended?

This is the section from the CLLocationManager documentation describing the app behavior with startMonitoringSignificantLocationChanges: If you start this service and your application is subsequently terminated, the system automatically relaunches the application into the background if a new event arrives. In such a case, the options dictionary passed to the application:didFinishLaunchingWithOptions: method of your application delegate […]

How do I show/hide a UIBarButtonItem?

I created a toolbar in IB with several buttons. I would like to be able to hide/show one of the buttons depending on the state of the data in the main window. UIBarButtonItem doesn’t have a hidden property, and any examples I’ve found so far for hiding them involve setting nav bar buttons to nil, […]

How to differentiate between iphone4 and iphone 3

I am trying to build a game for the iphone using cocos2d engine. I wanted to know how can I tell a difference whether the user is using iphone 4 or iphone 3 as I wanted to load hi-resolution graphics for the iphone4 and low-resolution for iphone 3. I know if I use @2x.png at […]