Data dodania Pytanie
2017-01-11 09:01 ARC working method and Necessity of Strong, Weak and UnOwned references »
I was facing problem with deallocation of View Controller in my code, then I read about how ARC work and about Strong, Weak and UnOwned references. I ...
(1) odpowiedzi
2017-01-11 08:01 Dramatically long Swift compile time »
I like Apple, I like things that they do, but Swift... oh I have a problem with Swift compile time on my machine. Configuration: MacBook Pro (Retin...
(1) odpowiedzi
2017-01-10 22:01 How to convert Objective-C line to Swift? »
I have code in Objective C: NSMutableArray* paths = [textView.textContainer.exclusionPaths mutableCopy]; and now when I try to convert it to Swift:...
(3) odpowiedzi
2017-01-10 15:01 Force passing a single parameter, to a multi-optional-parameter function »
Consider following function: func myFunction(completion: (data: Data?, error: Error?) -> ()) { } My current requirement would be to have complet...
(3) odpowiedzi
2017-01-10 14:01 Why is the intersection of two non-overlapping CharacterSets non-empty? »
I was trying to user CharacterSet to check if a user input string contains any non decimal digit characters. I use CharacterSet.decimalDigits and take...
(1) odpowiedzi
2017-01-10 13:01 React Native on iOS returns HTTP 406 Not Acceptable error message »
I'm trying to show a React Native view in my iOS application using Swift 2. React Native returns the HTTP 406 Not Acceptable error message. let bridg...
(0) odpowiedzi
2017-01-10 06:01 How to transition scenes in SpriteKit? »
I am creating a game, and where I want to transition scenes. However, I am getting this error when using transitioning scenes: [Graphics] UIColor ...
(3) odpowiedzi
2017-01-09 14:01 Extract float from byte data »
I need to extract some listmode bigEndian Float data from a binary file format. I was originally using the following method and it worked perfectly, b...
(2) odpowiedzi
2017-01-09 11:01 ambiguous use of selector dataTask(with: completionHandler:) »
I'm trying to get a selector of the dataTask(with:completionHandler:) method defined in URLSession which uses URLRequest object like below, but gettin...
(1) odpowiedzi
2017-01-09 11:01 Type inference when using lazy instantiation »
Why does type inference on Swift not work here when using lazy instantiation of a property? class GameView: UIView { private lazy var animator = ...
(0) odpowiedzi
2017-01-09 11:01 How to create circular and triangular buttons »
Below I have attached code I am currently using to create a blue button in Swift 2, Xcode 7 I wanted to know if there was a way to create the button ...
(3) odpowiedzi
2017-01-09 04:01 Implementing Facebook comments widget in iOS app »
A lot of websites allow you to post comments through your Facebook account, and I wanted some pointers of how to port this feature into iOS. The iOS a...
(0) odpowiedzi
2017-01-08 21:01 Facebook log in with Realm throws status code 400 error »
I logged in with Facebook and then used this code: let facebookCredentials = SyncCredentials.facebook(token: FBSDKAccessToken.current().tokenString) ...
(1) odpowiedzi
2017-01-08 18:01 How to access the Terminal's $PATH variable from within my mac app, it seems to uses a different $PATH »
I'm trying to make a mac app where the user can type in commands just like they would in the mac terminal, I got most of it working however I found ou...
(1) odpowiedzi
2017-01-08 17:01 Add custom .colorNames to UIColor somehow? »
I quite like the shortcuts for using colours like this: myLabel.fontColor = .gray And making my own, like this: static let fadedGreen = SKColor.in...
(2) odpowiedzi
2017-01-08 11:01 How to call the more specific method of overloading »
Here is an example playground: protocol P { associatedtype T func getValue() -> T } class Foo: P { func getValue() -> String { ...
(1) odpowiedzi
2017-01-08 11:01 Would like help understanding this Swift hackery »
I bumped into this example of a cool Swift technique without an explanation of how it works or what it does really, and even though I've written a dec...
(1) odpowiedzi
2017-01-08 09:01 I can't play video saved in Directory path and AVPlayer in swift 2.3 »
I'm recording a video with AVFoundation, and I created a preview from the video, when I finish to record a video, the video is playing in the preview,...
(1) odpowiedzi
2017-01-07 23:01 TouchesMoved() lagging very inconsistently when there is a SkSpriteNode with a physics body »
I'm using Swift 3.0, SpriteKit, and Xcode 8.2.1, testing on an iPhone 6s running iOS 10.2. The problem is simple... on the surface. Basically my Touc...
(2) odpowiedzi
2017-01-07 20:01 Swift mac app, run terminal command without knowing the path (so it looks in every path in $PATH)? »
I'm trying to run terminal commands from my swift mac app, i want the users to enter any command like they would in the terminal without having to spe...
(1) odpowiedzi
2017-01-07 18:01 How to use iOS Charts when pulling in multiple data from an array? »
I have been learning to use iOS Charts over the past few days and have successfully gotten to them work when dealing with 'single' data called in from...
(1) odpowiedzi
2017-01-07 07:01 Append to array in [String: Any] dictionary structure »
Assembling a data payload passed to GRMustache.swift for rendering mustache templates, I'm in a scenario where I need to append data to an array previ...
(3) odpowiedzi
2017-01-06 17:01 Swift 3: Filter a range »
In Swift 2 it was possible to filter a range like this: let range: Range<Int> = 1..<100 let mult4 = range .filter{n in n % 4 == 0} In ...
(3) odpowiedzi
2017-01-06 15:01 SSL Certificate {Non-self-signed certificate} not connecting Socket.io to Nodejs server »
I tried to connect to a non-secure {without SSL} node.js server via socket.io-client and when i run HTTP it works fine in the iOS app But when I conn...
(0) odpowiedzi
2017-01-06 14:01 How to use toast method in app delegate functions using swift »
Hi am developing app using swift in my app I want use toast message and toast activity so i followed the link: https://github.com/scalessec/Toast-Swif...
(3) odpowiedzi
2017-01-06 13:01 yoga/Yoga.h header file not found after react-native integration in the existing iOS app »
After integrating react-native in my Swift iOS app, I am not being able to build. yoga/Yoga.h file cannot be found. I have gone through the docs, chec...
(1) odpowiedzi
2017-01-06 11:01 Swift variable name with ` (backtick) »
I was browsing Alamofire sources and found variable which name is backtick escaped in this source file open static let `default`: SessionManager = {...
(3) odpowiedzi
2017-01-06 06:01 Upload multiple images in swift using Alamofire »
I'm using the following code to upload a single image to a server: private static func urlRequestWithComponents(urlString:String, parameters:Dictiona...
(1) odpowiedzi
2017-01-06 00:01 swift: detect which skaction stopped in group »
i have a node bear that has two skactions on it (in a group). Action bearmove is on a loop, while moveUp is not, moveUP should only happen once. let ...
(1) odpowiedzi
2017-01-05 18:01 Embedded Navigation bar disappears on iOS 7 (small screen size) but not iOS 9 (larger screen) after performing segue »
I have a show segue called showPage from a view controller to a table view controller and am calling performSegueWithIdentifier() to get it to show af...
(0) odpowiedzi
2017-01-05 16:01 How to join array of optional integers to string? »
Given [Int?], need to build string from it. This code snippet works let optionalInt1: Int? = 1 let optionalInt2: Int? = nil let unwrapp...
(5) odpowiedzi
2017-01-05 15:01 Swift/ObjC: IBOutlets shown as `not bound` from Interface Builder »
Ever since Xcode 6, when you bind objects from a Storyboard/xib file to a variable in your class, they often show not bound in the class. So, finding ...
(1) odpowiedzi
2017-01-05 12:01 How to add a continuous sine wave mask to an image iOS? »
I am trying to create a loader framework which will almost look like this. But I don't have much info about how to do this. Creating a sine wave using...
(1) odpowiedzi
2017-01-05 11:01 Swift: where to place IBAction functions for clean class code »
What is your best practice with IBActions? Where do u place them? I cannnot decide. 1) If I place them with regular functions, it can be messy but ev...
(1) odpowiedzi
2017-01-05 11:01 Should I avoid UI when iOS app is launched in background »
My app supports background location updates (specifically with significant location monitoring). Do I need to prevent UI (via controllers etc.) from ...
(2) odpowiedzi