Data dodania Pytanie
2017-01-01 06:01 Assigning a Variable to an Underscore in Swift »
After researching stackoverflow about underscores in Swift I understand that an underscore means a) ignore this function and b) you can omit the param...
(2) odpowiedzi
2017-01-01 00:01 How to update UI using the JSON result through a completion handler? »
I'm trying to update some labels based on data returned from JSON. Here are the data objects and the function to update the JSON data objects : class...
(1) odpowiedzi
2016-12-31 23:12 Understanding syntax of closure with no return type »
I am getting into swift for the first time here and I have stumbled across a closure statement that doesn't make a whole lot sense to me based off of ...
(2) odpowiedzi
2016-12-31 18:12 Making CNContact on tableView presistant using NSUserDefaults »
I am trying to save the CNContact as an NSUserDefault object when the save button it pressed. Then When the App opens up I want the CNContacts to be p...
(0) odpowiedzi
2016-12-31 16:12 How to check/predicate function type in Swift? »
For example: func f(x: Int) -> Int { return x } func h(f: @escaping (Int) -> Any) { if (f is (Int) -> Int) { print(f(1)) } els...
(3) odpowiedzi
2016-12-31 09:12 How to make umbrella framework, sub-framework error »
How to make umbrella framework in xcode 8? I saw this How to create an umbrella framework in iOS SDK? and How to add a framework inside another frame...
(0) odpowiedzi
2016-12-31 01:12 Set UIViewController view property to custom UIView class without storyboard / nib »
I have a UIViewController called LoginViewController. I want to build the view of that LoginViewController fully programmatically in a custom UIView c...
(3) odpowiedzi
2016-12-30 23:12 Save contacts into tableview using core data »
I have an app that uses the Contacts framework for iOS 9+. I have made a tableview that holds some selected contacts by the users. I want to be able t...
(1) odpowiedzi
2016-12-30 13:12 How to move through Views without reload them again if I return back Swift »
I'll give an example of what I want so it's not so confusing: Example: Let's say that I have a map that adds every time that my user scrolls 3 annot...
(2) odpowiedzi
2016-12-30 11:12 Implementing LazyCollectionProtocol »
So I was following tutorials about LazySequenceProtocol and LazyCollectionProtocol. First, I tried sample codes from Apple's API reference and was ab...
(1) odpowiedzi
2016-12-30 10:12 C# using Statement equivalent in Swift »
I'm very new to Swift language, I have a C# Background. and I'm wondering if there is an equivalent code for C# using statement in swift Language us...
(1) odpowiedzi
2016-12-30 01:12 Special drop shadow: Swift 2 »
In the image below, I have two types of drop shadows. In swift, I've used this function: func applyShadow(view: UIView){ view.layer.shadowColo...
(2) odpowiedzi
2016-12-29 12:12 Populate tableview using contacts framework »
I want to populate a tableview with contact details that I have entered in the app. first i have a table view controller that will show the list of ...
(0) odpowiedzi
2016-12-29 10:12 Xcode 8.2 Use Legacy Swift issue »
When I try to run in xcode 8.2 with set "User Legacy Swift -> YES" in build setting, it give me errors for cocoapods only. I receive the following er...
(1) odpowiedzi
2016-12-29 08:12 Infinite length array in swift »
I noticed one thing in Haskell that it efficiently handle working with infinite length array with great ease. So being swift programmer, I am curious...
(3) odpowiedzi
2016-12-29 04:12 How to properly calculate 1 second with deltaTime in Swift »
I'm trying to calculate an elapsed second in deltaTime but I'm not sure how to do it, because my deltaTime constantly prints 0.0166 or 0.0167. Here i...
(2) odpowiedzi
2016-12-28 22:12 From NSData to SecKeyRef in swift 2 »
I have a public/private key pair generated with RSACryptor.swift I am able to convert my public key into a base64 string to be stored on my server. I...
(1) odpowiedzi
2016-12-28 18:12 Open controller from app delegate »
I am trying to open a view controller from app delegate if a push notification is clicked with the code below func application(application: UIApplica...
(1) odpowiedzi
2016-12-28 16:12 Perform action in host app from Today extension(Widget) Without opening app ios »
I want to manage some action in containing app from today extension(Widget). Full description: in my containing app, some action (like play/pause au...
(2) odpowiedzi
2016-12-28 08:12 Arrange Int order displayed from .plists in Swift? »
I have a list of plist files that reads an Int and displays it in my collectionView. The issue I'm having is that the collectionview doesn't display t...
(0) odpowiedzi
2016-12-28 06:12 swift check if two array contains Same element and get the element? »
How can I compare two arrays in swift which have a common element and get that element? let a1 = [1, 2, 3] let a2 = [4, 2, 5] I want to compare a1...
(1) odpowiedzi
2016-12-28 04:12 How do I know if an object can be weakly referenced? »
Foundation Release Notes for OS X v10.11 and iOS 9: NSNotificationCenter says: "If an object can be weakly referenced notifications will no longer be ...
(2) odpowiedzi
2016-12-27 21:12 Updating an item in an array passed by reference »
What's the easiest/right way to update an item in an array? I want the caller to have the updated array as well. So: static func updateItem(updatedIt...
(2) odpowiedzi
2016-12-27 18:12 How do I make a view that stays onscreen when the main view segues? »
How do I make a view that does not appear to be reloaded (stays onscreen) every time a view segues? Like the audio controls in Apple's iOS podcast app...
(3) odpowiedzi
2016-12-27 13:12 Add image to Navigation Bar Back Button »
I want to have the back button with "< [IMG]" instead of "< Back" which is by default. let barAppearace = UIBarButtonItem.appearance() barAppea...
(3) odpowiedzi
2016-12-27 13:12 How to build a custom Swift framework and how is it related to the SPM? »
I am currently building code that I would really like to use as a framework by being able to import MyCustomFramework as I would with Apple frameworks...
(2) odpowiedzi
2016-12-27 06:12 How to pass image string value to the imageslide using swift »
I am developing a app using swift 2.2 in my app am using image slide show by refering this link https://github.com/zvonicek/ImageSlideshow i want to p...
(1) odpowiedzi
2016-12-26 23:12 How to convert Data to Int in Swift 3? »
There're a lot of sources explaining how to make it in Swift 2 which I took as a base: var value: Int = 0 let data: NSData = ...; data.getBytes(&...
(1) odpowiedzi
2016-12-26 16:12 How do I combine the safety of type requirements with the safety of enums? »
So I'm working on an sql database abstraction layer in swift and I want to write it as safe as possible. By that I mean I would prefer to make it impo...
(0) odpowiedzi
2016-12-26 12:12 Repeat UserNotification every specific day of week for iOS 10 »
I'm working on local notification scheduling module for iOS 10 which repeats local notification for example every Sunday or every Monday..etc. Lets sa...
(1) odpowiedzi
2016-12-26 08:12 iOS How to implement Matching scenario »
In my iOS Application i have to match the elements like below image , How to draw the line between selected views. What kind of guesstures i have to u...
(0) odpowiedzi
2016-12-25 21:12 Want to change UIView background color with time of day »
Pretty simple, I just want to change my backgroundView's color depending on the time of day, but for some reason it doesn't work. Any help would be gr...
(2) odpowiedzi
2016-12-25 21:12 Swift animation for periscope-style comments »
I am using this code for periscope-style comments in my iOS app (where the comment bubbles slide up from the bottom): https://github.com/yoavlt/Perisc...
(1) odpowiedzi
2016-12-25 10:12 Error: Editor placeholder in source file, when converting String extension to swift 3 »
subscript (r: Range<Int>) -> String { let start = startIndex.advancedBy(r.startIndex) let end = start.advancedBy(r.endInd...
(1) odpowiedzi
2016-12-25 09:12 Swift 3: Type error of generic delegate type with concrete consumer type »
I have a problem with a generic delegate ProducerDelegate, which will have an argument (Int) with the same type as the consumer IntConsumer method nee...
(1) odpowiedzi