Data dodania Pytanie
2017-03-18 15:03 Import external nodes in SpriteKit using Swift »
I'm working on a Breakout type game. I created the paddle in a different scene (PaddleScene.sks) so I could reference it across multiple levels. Not s...
(2) odpowiedzi
2017-03-18 11:03 Is this bad or good for performance if I always initialize one type of class in different classes? »
world! I have an Actions class, where I hold all actions, animations and sound-plays in my sprite-kit game. So in all my SKNode, SKScene, SKSpriteNode...
(1) odpowiedzi
2017-03-18 11:03 Actually this is a code in swift 2.0, can someone tell me how to code these in swift 3.0? »
func searchBar(searchBar: UISearchBar, textDisChange searchText:String){ filteredArray =tableData.filter({ names: String) ->Bool in retur...
(1) odpowiedzi
2017-03-18 07:03 How can I constantly check if the value of a bool is true/false? SWIFT »
Hello my problem is simple I have to constantly check whether the value of a bool is true or false, what I have tried so far is to use the: override...
(2) odpowiedzi
2017-03-17 16:03 Why Is UITextField.text An Optional? »
It starts out as an empty string instead of nil. Even when it is explicitly set to nil it remains an empty string. I don't get it. Perhaps to make it ...
(2) odpowiedzi
2017-03-17 06:03 Is it possible for a button to open into a specific tab when using the Tab Bar Controller? »
The question is a little confusing to articulate so hopefully an image will be a little more helpful. Here's the setup: So, I want the First View b...
(2) odpowiedzi
2017-03-17 00:03 How to port swift based cocoapods to Xamarin »
I am trying to port cocoapods to xamarin. Objective C based cocoapods can be ported by converting it into a static library(.a) and subsequently conve...
(1) odpowiedzi
2017-03-16 23:03 Leaderboard Facebook Score Api Swift »
I'm a new developer and have been trying to find a swift 3 tutorial for how to create a leaderboard based on Facebook's Score API - without any result...
(0) odpowiedzi
2017-03-16 19:03 weak vs unowned in Swift. What are the internal differences? »
I understand the usage and superficial differences between weak and unowned in Swift: The simplest examples I've seen is that if there is a Dog and a...
(2) odpowiedzi
2017-03-16 10:03 Why UnsafeRawPointer shows different result when function signatures differs in Swift? »
The code below can be run in a Swift Playground: import UIKit func aaa(_ key: UnsafeRawPointer!, _ value: Any! = nil) { print(key) } func bbb(_ ...
(1) odpowiedzi
2017-03-16 04:03 Swift 3.1 deprecates initialize(). How can I achieve the same thing? »
Objective-C declares a class function, initialize(), that is run once for each class, before it is used. It is often used as an entry point for exchan...
(1) odpowiedzi
2017-03-16 03:03 How to get rid of right padding in Eureka ImageRow? »
I am trying to get rid of the (right) spacing in an image row in Eureka (not on their latest version, but the one before). Here is the image after up...
(0) odpowiedzi
2017-03-15 20:03 Objective-C method that returns a block is not available in Swift »
I'm building an Objective-C library that must be compatible with Swift, and I'm having an issue with several methods that return Objective-C blocks be...
(0) odpowiedzi
2017-03-15 10:03 How can my Cocoa application be notified of NSScreen resolution changes? »
I am making a Cocoa application with a floating window. The floating window is supposed to be centered on the main screen, at a size which is 1/4 of t...
(1) odpowiedzi
2017-03-15 08:03 How to set a default alert in the calendar? »
Trying to add an even to my user's calendar, but not sure how to set the default alerts. What I have is this so far: func createEvent(item: Item) { ...
(1) odpowiedzi
2017-03-15 07:03 Decode String with swift 3 »
I got the following encoded string in my web service response \U00e0\U00aa\U0095\U00e0\U00ab\U0083\U00e0\U00aa\U00aa\U00e0\U00aa\U00be \U00e0\U00aa...
(1) odpowiedzi
2017-03-15 04:03 Why does compiler warn of unused result on function marked @discardableResult? »
The Swift 3 compiler is warning me of an unused result, even though I have marked the function with @discardableResult. It is only occurring when cal...
(1) odpowiedzi
2017-03-14 13:03 How to create an expandable text field/label in swift? »
I need to figure out how to program something like this: The text expands as the user clicks the down button and fold back to the short version afte...
(3) odpowiedzi
2017-03-14 10:03 Is it possible to play a Song from iOS Music Library with AVAudioEngine? »
i have succesfully created a AVAudioEngine. It plays local sound-files from the project-directory. But how can I get access to the Music Library on th...
(1) odpowiedzi
2017-03-14 07:03 What is the difference between Target and Action in swift? »
When should I work with Target and nil action? On the other hand, when should I work with Action and nil Target and when should I work with both Actio...
(5) odpowiedzi
2017-03-13 19:03 Call method on subclass to UITableViewCell with generic parameter value based on protocol or base class »
I want to simplify the calling of a "setup"-method in UITableViewCell subclasses. However, not all setup methods are the same, but their parameters in...
(2) odpowiedzi
2017-03-13 12:03 Swift - Infinite loop for empty array »
I've just upgraded my project to Swift 3 from 2.3. All my for loops are going infinite. I can reproduce it in a fresh playground as well: Here's what...
(0) odpowiedzi
2017-03-13 10:03 Swift: Finding an Object Property via regex »
Target: The following function shall iterate over an array of objects and check a specific property of all objects. This property is a string and shal...
(2) odpowiedzi
2017-03-13 01:03 Save event to user's calendar »
How do you add an event to the user's calendar, but then allow the user to choose the calendar, etc. I have this code that works, but this adds the ev...
(2) odpowiedzi
2017-03-12 22:03 Create a gradient overlay over an image »
How do you create a gradient overlay to get this kind of effect? https://dribbble.com/shots/2199202-Today-s-Tasks ...
(1) odpowiedzi
2017-03-12 21:03 FBSDKAppInviteDialog doesn't load list of friends »
UIWebView page that was opened by showing FBSDKAppInviteDialog doesn't load list of friends as usual, but stops either at an empty page state or at th...
(1) odpowiedzi
2017-03-12 20:03 Optional field type doesn't conform protocol in Swift 3 »
I have a class with 1 optional field and 1 non-optional field, both of them with Type AnotherClass and also conform CustomProtocol: protocol CustomPr...
(2) odpowiedzi
2017-03-12 18:03 How to bring up a xib as a "pop up" in a ViewController? »
I have designed a nice Login box as a xib file in Xcode and when a user taps "Log In" on the landing page on my app, I'd like the Login Box to pop up ...
(2) odpowiedzi
2017-03-12 12:03 List all subclasses of one class »
I can return a list of all subclasses of one class? For example: class Mother { } class ChildFoo: Mother { } class ChildBar: Mother { } let mot...
(1) odpowiedzi
2017-03-11 22:03 Determining which UIPicker's toolbar button sent a message »
I am trying to use multiple UIPickers on a page. I think I've configured almost everything. When I use a UIPicker I add in a a tool bar with a "Cancel...
(5) odpowiedzi
2017-03-11 16:03 Swift Linux Generate Random Bool »
I am trying to make a static extension of Bool to return a random true/false value whenever called. I am trying to make this work: static func coinFl...
(1) odpowiedzi
2017-03-11 09:03 Cannot convert the value of type '[String]' to expected argument type 'String' : while appending arrays to get data from Fireabse in table view cell »
Getting error while appending arrays in snapshot. I want to retrieve all values from these arrays EngNames , UrNames and cakeImages in the snapshot so...
(1) odpowiedzi
2017-03-11 06:03 Cropping by any kind of quadrangle »
I need a cropping system by which I can make any kind of quadrangle rect and can crop by this rect. I search a lot but get nothing about this. I have ...
(0) odpowiedzi
2017-03-10 15:03 Shadow on UIView layer »
I've make a path in order to mask my view: let path = // create magic path (uiview bounds + 2 arcs) let mask = CAShapeLayer() mask.path = path.cgPath...
(2) odpowiedzi
2017-03-10 12:03 App Transport Security blocks routing via custom url scheme »
My iOS app (written in Swift and React Native) has a custom url scheme that allows me to route to the app from e.g. Safari like this myappscheme://htt...
(4) odpowiedzi