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

How to toggle visibility of NSSplitView subView + hide Pane Splitter divider?

We have a parent Split view (NSSplitView), and two subviews, Content and SideBar (the sidebar is on the right). What would be the optimal Cocoa-friendly way to toggle the SideBar view? I would really love it, if the suggested solution includes animation I really don’t need any suggestions related to external plugins, etc (e.g. BWToolkit) […]

Dynamic strings with placeholders and plural support in Swift (iOS)

I am new to Swift and iOS programming and I came across a question regarding Dynamic strings with placeholders and plural support in Swift For example, if you have a Multi-Language app and do not want to hardcode strings and labels and messages and etc… I can easily do this in Android with following code […]

Download dSYM fails “Missing App Version”

When I try to download the dSYM from the organizer, it gives me this error : Missing App Version An app record for “co.**” was found but a matching version for “1.0.3” build “10” was not. I have enabled Bitcode. It’s a swift app with Swift and Objective-C pods. Xcode Version 7.2 (7C68) When I […]

Swift : Error: 'required' initializer 'init(coder:)' must be provided by subclass of 'UIView'

I have a problem when I build my app in swift 2. Xcode says: ‘required’ initializer ‘init(coder:)’ must be provided by subclass of ‘UIView’ This is the code of the class : class creerQuestionnaire: UIView { @IBOutlet weak var nomQuestionnaire: UITextField! @IBOutlet weak var question: UITextField! @IBOutlet weak var reponse: UITextField! var QR: Questionnaire @IBAction […]

'(NSObject, AnyObject)' is not convertible to 'String'

How do I convert an object of type (NSObject, AnyObject) to the type String? At the end of the first line of the method below, as String causes the compiler error: ‘(NSObject, AnyObject)’ is not convertible to ‘String’ Casting street to NSString instead of String compiles, but I’m casting street to String because I want […]

Identifying which button pressed in a custom listView cell in Swift

I’ve created a custom cell for a listView in Swift. It has two buttons on it – one a ‘pause’ button and one a ‘stop’ button. The idea is that each line item represents a download so the user can stop and start each independently. However, I need to create an @IBAction for each of […]

Swift cannot infer type from context

I have a seemingly legitimate function that converts an array to a Dictionary: func arrayToDictionary<Key : Hashable, Value> (source: Array<Value>, key: Value -> Key) -> Dictionary<Key, Value> { var dictionary = Dictionary<Key, Value>() for element in source { let key = key(element) dictionary[key] = element } return dictionary } Now, when I try to call […]

Import LocalAuthentification.framework crashes on iOS 7.1

Have a problem with usage of LocalAuthentication and support iOS 7.0 when I’m trying to import LocalAuthentication I’m getting crash if target iOS version is less than 8.0. I tried to mark LocalAuthentication.framework as optional in the build phases and check class availability by calling: var isTouchIDSupported: Bool { if let contextClass: AnyClass = NSClassFromString(“LAContext”) […]

Change width of a UIBarButtonItem in a UINavigationBar in swift

i need to set frame for my navigation bar button in swift 2.0 i tried this code self.navigationController!.navigationBar.drawRect(CGRectMake(0, 0, 30, 30)) but it won’t work thanks in advance

Swift Mirror reflection not returning properties on UIVIew

Trying to get all properties of UIView or UIViewController with the follownig: func propertysNames()->[String]{ var s = [String]() for c in Mirror(reflecting: self).children { if let name = c.label{ s.append(name) } } return s } This works on UIVIewController, but UIView does not seem to return properties, any advice?