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

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() { […]

UIScrollView and Constraints

I’m trying to place a UIImageView at the top of a UIScrollView and when I constrain the UIScrollView to the sides of the View Controller and constrain the UIImageView to the top and make the width of the UIImageView equal to the UIScrollView it makes the UIImageView way wider than the UIScrollView, and much taller […]

Application crashed while importing songs from Ipod library in Iphone for iOs 5.0

Hello i am using below framworks, #import <MediaPlayer/MediaPlayer.h> #import <AudioToolbox/AudioToolbox.h> #import <AVFoundation/AVFoundation.h> In one of button event i have implemented below code to open Library. MPMediaPickerController *mediaPicker = [[MPMediaPickerController alloc] initWithMediaTypes:MPMediaTypeMusic]; mediaPicker.delegate = self; mediaPicker.allowsPickingMultipleItems = YES; // this is the default [self presentModalViewController:mediaPicker animated:YES]; [mediaPicker release]; And in delegate methods of MPMediaPickerController implemented code […]

Invalid Swift Support / invalid implementation of swift

I’d like to upload an app written in swift. Application loader delivers the app successfully, but after a few minutes I get a reply by apple telling: Invalid Swift Support – The bundle contains an invalid implementation of Swift. The app may have been built or signed with non-compliant or pre-release tools. Visit developer.apple.com for […]

NSLocalizedString with swift variable

I’m trying to localize my app using NSLocalizedString. When i import the XLIFF file, most works like a charm but something do not and some string is not localized. I have noticed that the problem is from NSLocalizedString containing something variable inside like: NSLocalizedString(” – \(count) Notifica”, comment: “sottotitolo prescrizione per le notifiche al singolare”) […]

How to dismiss ViewController in Swift?

I am trying to dismiss a ViewController in swift by calling dismissViewController in an IBAction @IBAction func cancel(sender: AnyObject) { self.dismissViewControllerAnimated(false, completion: nil) println(“cancel”) } @IBAction func done(sender: AnyObject) { self.dismissViewControllerAnimated(false, completion: nil) println(“done”) } I could see the println message in console output but ViewController never gets dismissed. What could be the problem?

Detect carrier connection type (3G / EDGE / GPRS)

How can i get the type of connection of a carrier network? I’m able to get if connection is WIFI or WWAN using Reachability class I’m able to get network flags Reachability Flag Status: WR t—— localWiFiStatusForFlags I’m able to get WIFI SSID using CaptiveNetwork Supported interfaces: ( en0 ) en0 => { BSSID = […]