Data dodania Pytanie
2017-02-04 09:02 Array.map() produces '[T]', not the expected contextual result type '[String: Any?]' »
I'm writing an extension to bridge the dictionary values between FirebaseDatabase and Eureka. private extension Dictionary { func firebaseFriendl...
(3) odpowiedzi
2017-02-04 08:02 I need clarity on difference between swift 3 compatibility and API availability »
Some examples: In swift 2 we had NSData and NSUrl; in swift 3 we have Data and URL. If you alt click on Data it says available from iOS 10 and above. ...
(1) odpowiedzi
2017-02-03 14:02 Back to app button, starts over my app »
When my application redirects the user to safari (happens also with other redirections not only safari) using UIApplication.shared.open(URL ..) an...
(1) odpowiedzi
2017-02-03 13:02 Inherit from @objc protocol »
I have this protocol inheritance @objc protocol Base {} protocol Some : Base {} And the code to check it main.swift: import Foundation class Mod...
(1) odpowiedzi
2017-02-03 02:02 Can I assign a default type to generic type T in Swift? »
I have a generic class that I want to be able to use with a default type. Right now I can initialize it with any type, but I have to be explicit. //I...
(1) odpowiedzi
2017-02-02 20:02 Firebase Facebook login button does not change after user log out »
I'm currently using Facebook as a login in for my users to sign. When my users have to sign out I have a custom button made calling a sign out method ...
(1) odpowiedzi
2017-02-02 17:02 Accelerometer in CoreMotion Not Working In Swift 3 »
My app uses CoreMotion to allow the player to move when the device is tilted. It worked perfectly in Swift 2 but when I updated it to Swift 3 it has s...
(1) odpowiedzi
2017-02-02 16:02 continueTrackingWithTouch not working when subclassing from UIButton »
everyone knows that when you drag outside a button it don't cancel the highlight state right away by UIButton's default. UIControlEventTouchDragExit t...
(1) odpowiedzi
2017-02-02 13:02 How to set Email Recipients in UIActivityViewController In Swift. Is it possible? »
I want to add a choice to my UIActivityViewController to allow my users to send an email to every single one of their contacts. How can I assign emai...
(2) odpowiedzi
2017-02-02 13:02 Removing views, ARC, differences from Objective C and Swift »
In Objective C, if a ViewController has a UIKit object property, lets just say a view, and is instantiated in viewDidLoad, followed by being added to ...
(1) odpowiedzi
2017-02-02 12:02 Facebook Login SDK 4.19.0 »
I'm trying to log-in with Facebook to my Firebase Auth. I already followed the Firebase guides. And i followed Facebook log-in guides too. I tried to ...
(0) odpowiedzi
2017-02-02 10:02 how to parse the error from web request »
here is my code api response for error: guard (error == nil) else { print("There was an error with your request: \(error)") return } re...
(2) odpowiedzi
2017-02-02 05:02 How to show the step progress bar »
I'm creating a demo project for showing form progress. I mean, as the user fills the form in four steps, I want to show the progress of each of the us...
(0) odpowiedzi
2017-02-01 15:02 Create array with key from dict with sorted by dict values »
I have an dictionary that I want to iterate trough in a tableview. One way of doing this is to create an array with all the keys and just fetch the ke...
(4) odpowiedzi
2017-02-01 13:02 How to achieve trackball and access label above Bar on Bar charts in Swift 3x »
Hello Developers I am working on project where I have used danielgindi/Charts a third party library now the challenge here is I need to present a trac...
(2) odpowiedzi
2017-02-01 13:02 Wrong specialized generic function gets called in Swift 3 from an indirect call »
I have code that follows the general design of: protocol DispatchType {} class DispatchType1: DispatchType {} class DispatchType2: DispatchType {} f...
(1) odpowiedzi
2017-02-01 11:02 Swift generic coercion misunderstanding »
I'm using Signals library. Let's say I defined BaseProtocol protocol and ChildClass which conforms BaseProtocol. protocol BaseProtocol {} class Chil...
(1) odpowiedzi
2017-01-31 17:01 How to structure Swift code with several related CGPoint arrays »
Pardon me if this sounds quite trivial. I am trying to find a way to organize my code, whether creating a new class or a data structure of some sort. ...
(1) odpowiedzi
2017-01-31 16:01 Why do SKPhysicsContactDelegate on a separate class is not being called »
I have been trying to add a contact delegate to my GameScene: self.physicsWorld.contactDelegate = ContactManager() However, I am doing this by havi...
(2) odpowiedzi
2017-01-31 11:01 UISearchController Needs an extra tap to become first responder »
I switched my apps one screen from UISearchBar to UISearchController. It's a tableview controller. As per design I should not keep the search bar on U...
(1) odpowiedzi
2017-01-31 05:01 Not getting callbacks of delegate methods in NSObject class ios swift »
-- Usage of class is mentioned in top of class file as a commented code. -- This class is used to find user's location and after that from location c...
(1) odpowiedzi
2017-01-31 02:01 How to present view controller embedded in navigation controller modally? »
Say I have these view controllers: Navigation Controller -> vc1 -> vc2 -> vc3 I want vc3 to show modally (appear form the bottom), so I selected the ...
(1) odpowiedzi
2017-01-30 19:01 Unarchived Node doesn't appear when added to parent in SpriteKit »
Previously I was questioning if i could use the Scene editor to create complex SKSpriteNodes vs just using it to layout SKScenes. With the help of @An...
(1) odpowiedzi
2017-01-30 16:01 Why does filter(_:)’s predicate get called so many times when evaluating it lazily? »
I saw an answer to this question, which, in it’s first revision, had code similar to this: let numbers = Array(0 ..< 50) let result = numbers.l...
(1) odpowiedzi
2017-01-30 13:01 Multiple Collection Views with same XIB Cell and button »
I have a View Controller with multiple Collection Views. Each collection view is using the same custom cell with xib. In this xib i have a button. ...
(2) odpowiedzi
2017-01-30 12:01 How to get CFBundleURLSchemes of an app in iOS Swift »
I have made a demo project App1 in which I added a button which will redirect me to the installed app suppose App2("fitbit") I have gone through many ...
(1) odpowiedzi
2017-01-29 12:01 How to make a screenshot of all the content of a Scrollview? »
I want to create a screenshot of a UIScrollView which should contain the whole content of the scroll view, even that content, which is currently not v...
(1) odpowiedzi
2017-01-29 08:01 using Objective-C protocol in Swift »
I have a protocol defined in Objective-C as below @protocol TestProtocol @required - (void) printInputString:(NSString*) s @end This protocol is ...
(0) odpowiedzi
2017-01-29 08:01 Crop Photo with Custom Shape »
I'm looking for some guidance as I build out a custom camera. I've used square cropping for photos in previous projects, but now I need to create a cu...
(1) odpowiedzi
2017-01-29 07:01 Swift memory address of outside instance of inout parameter same as copied instance »
This is my playground code. import Foundation func printAddress<T>(anyObj: T,message: String = "") { var copy = anyObj withUnsafePointer(...
(1) odpowiedzi
2017-01-28 20:01 Where is the '_?' syntactic sugar for pattern matching for '.some' documented? »
TL;DR The syntactic sugar _? can be used in pattern matching as a substitute for .some(_) (.some). Where in the official language docs is this docu...
(1) odpowiedzi
2017-01-28 11:01 How to simulate mouse click from Mac App to other Application »
I am trying to simulate mouse click on iphone simulator from macos App for that I am using CGEvents . the process id is 33554 for iPhone simulator ...
(1) odpowiedzi
2017-01-28 07:01 How do I unfocus UITextFields when user presses other controls/blank space? »
I have a UITextField. It works normally, meaning that when pressed, it fires EditingDidBegin method etc. The problem is that I cannot deselect it, mea...
(6) odpowiedzi
2017-01-27 11:01 Initializing attributes in a different method »
I have a class and initialize the attributes with default values: class Point { var x : Int var y : Int public init() { x = 1 y = 1 ...
(5) odpowiedzi
2017-01-27 09:01 XCode 8 playground execution failed, Couldn't lookup symbols »
Hello and welcome to my question over XCode 8. I have just downloaded and installed the new version of XCode on my mac from the mac app store. My mac ...
(0) odpowiedzi