Data dodania Pytanie
2017-05-30 01:05 How Does Things 3 Tint their Status Bar Text »
In Things 3, the status bar text (wireless signal, time, battery, etc.) in the iOS app is a medium-gray color. Normally you can only have black or w...
(2) odpowiedzi
2017-05-29 19:05 FacebookShare causing compiler error after update »
I just ran pod update for my app, and now it won't compile, giving these issues from LinkShareContent.swift in FacebookShare. Cannot assign to proper...
(1) odpowiedzi
2017-05-29 13:05 How to limit the movement of two anchored lines so they swing continually like a pendulum »
I have created two lines anchored to a sprite, which are 30˚ apart. I want both lines to swing left and right like a pendulum, always swinging from e...
(1) odpowiedzi
2017-05-29 01:05 Cannot convert return expression of type 'child' to return type T »
I am struggling a bit with generics in Swift. I have the following code: class Parent { init(value:SomeThing) {...} func clone<T: Parent>() ...
(1) odpowiedzi
2017-05-28 21:05 Is there a way to guarantee the running of some code whenever an iOS app closes? »
I tried putting my code in the applicationWillTerminate function of the app delegate but noticed it wasn't being called when I closed the app and then...
(1) odpowiedzi
2017-05-28 20:05 Resolving too many else-if statements in Swift 3 »
Problem: Given the inputs of the function, test each user to make sure they conform to the following conditions: 1. Each user in the users array cann...
(2) odpowiedzi
2017-05-28 16:05 Launch arguments (NSDoubleLocalizedStrings, NSShowNonLocalizedStrings) don't work »
I'm trying to use the launch arguments such as NSDoubleLocalizedStrings and NSShowNonLocalizedStrings to test localization in my Objective-C project. ...
(1) odpowiedzi
2017-05-28 12:05 Assigning a reference from a class member to variable in Swift »
class UserDataStore { } class ProfileInteractor { var userDataStore: UserDataStore? init(userDataStore: UserDataStore?) { self.user...
(3) odpowiedzi
2017-05-28 04:05 Cannot assign protocol-conforming Objective-C class to a property with Swift Protocol »
I'm trying to have an Objective-C class adopt a protocol written in a Swift file. I've got Swift an Objective-C inter-operating to some extent. (I ca...
(1) odpowiedzi
2017-05-28 02:05 Getting error while running clubbed swift & react-native project on iOS device »
I have an existing project written on swift and I have integrated react native to it everything is working fine on simulator but while running on devi...
(1) odpowiedzi
2017-05-27 23:05 Using UITableView to display each attribute of NSManagedObject dynamically »
I have a UITableView and an NSManagedObject and I want to display one attribute per cell in the UITableView, what is the best way to do that? I'm hav...
(1) odpowiedzi
2017-05-27 22:05 How to keep a 30˚ distance between two lines anchored at a point »
I am trying to create two lines that are anchored at a certain point (sprite) and rotate to form a 30 degree angle between them. Below is an image wha...
(2) odpowiedzi
2017-05-27 20:05 Draw polyline with mapkit Swift 3 »
I want to draw a polyline from the current user location to an annotation point but it doesn't appear to draw anything: @IBAction func myButtonGo(_ s...
(1) odpowiedzi
2017-05-27 08:05 how to Fit image view in the Screen in all iPhoneScreens »
I have created image-view programmatically with constraints let imgName = "2017-01-18-2.png" let image = UIImage(named: imgName) let imgView...
(2) odpowiedzi
2017-05-27 06:05 I made a table view, how can I save the items even after the app is closed? »
I'm making my first app, and it has a task manager, for this, I made a table view in which you can input "tasks" through an alert. How can I save the ...
(3) odpowiedzi
2017-05-26 16:05 enum defined in Objc > Declared in Swift > to be used in Objc »
I have a situation. I would appreciated if anyone has a solution for this I have an objC enum say Abc I declare this in a swift class, say, MySwiftC...
(1) odpowiedzi
2017-05-26 09:05 Value type and reference type in Swift »
As per the apple documentation String is a Struct (value type) and NSString is Class (Reference type). Reference type means if we change the value of ...
(2) odpowiedzi
2017-05-26 07:05 IOS Swift3 how to Remove Custom UIView randomly »
I am building an iOS Application in swift 3, where I am creating dynamic UIViews. I need to remove custom view randomly. Please help me I am stuck wit...
(3) odpowiedzi
2017-05-26 00:05 Is it possible to destructure an object in switch operator? »
Today I found a clumsy piece of code: if segue.identifier == "settings" { if let settingsController = segue.destination as? SettingsController {...
(1) odpowiedzi
2017-05-25 17:05 Compare HKSample with another HKSample to prevent duplicates »
[Swift 3.0] I am trying to retrieve an HKSample from HealthKit to add data to my application and would also like to update the application whenever H...
(1) odpowiedzi
2017-05-25 17:05 Handing Firebase + Facebook login process »
I have Facebook Login in my app, and I'm running in circles trying to get a balance to new users needing to go through the signup screen, and register...
(1) odpowiedzi
2017-05-25 15:05 Swift 3 - Filter and sort array of dictionaries, by dictionary values, with values from array »
I am trying to implement the following behavior in an elegant way: Reorder users by the id in userIds and filter out all users whose id isn't in u...
(3) odpowiedzi
2017-05-25 14:05 What is the shortest code to get surrounding coordinates? »
I don't like my following implementation of surroundingPositions to get the x- and y-Coordinates surrounding a specific position, because in my opinio...
(2) odpowiedzi
2017-05-25 04:05 UserDefaults between Objective-C and Swift »
Just trying to be extra careful here... If I have an app that saved a value in UserDefaults like this in Objective-C: NSString *newString = textFiel...
(3) odpowiedzi
2017-05-24 22:05 Swift 2 Instance member 'circleIndexes' cannot be used on type 'GameScene' »
I am making a rhythm app, but I can't seem to randomize the circles. Here is my code: var alternator = 0 var fallTimer:NSTimer? var flag:Bool = true...
(1) odpowiedzi
2017-05-24 22:05 Updated modern Swift syntax to modern Swift syntax and project will no longer compile »
I recently was pasting a section of code from StackOverflow to my Swift 3 project, the code was written in Swift 2 so I highlighted the section of cod...
(1) odpowiedzi
2017-05-24 13:05 Change segue identifier name programmatically swift »
How can I change the identifier name of a specific segue programmatically? I found this way but didn't work with me: SWrevealviewcontroller : Switch...
(1) odpowiedzi
2017-05-24 11:05 Binary operator '&=' cannot be applied to two 'Bool' operands in Swift »
I'm trying to make multiple checks accumulating the result in a Bool: My code is: var validParams = login.characters.count > 4; validParams &am...
(3) odpowiedzi
2017-05-24 09:05 How to get a CGPoint from a tapped location on a custom View When Voice Over Enabled? »
I am setting up my app to be compatible with Voice Over feature. I have a graph, I am getting single tap on the -accessibilitiHint(). I need to confir...
(1) odpowiedzi
2017-05-24 09:05 How do you show web view with XML parsed variable in Swift 3? »
I'm pretty stuck in showing XML parsed data to web view. import UIKit import Fuzi class ViewController: UIViewController { @IBOutlet weak var webVi...
(1) odpowiedzi
2017-05-23 22:05 Sorting nil Dates to the end of an Array »
Trying to sort an array in Swift in descending order. This works well objectArray.sort{ $0.date!.compare($1.date!) == .orderedDescending} As you ca...
(1) odpowiedzi
2017-05-23 19:05 NoSQL data base design for firebase chat »
I am designing a chat app with the help of firebase but I am struck with the database design for the same. I have read the following link provided by ...
(0) odpowiedzi
2017-05-23 18:05 Errors referring to type "_": "Cannot assign value of type '[Value]' to type '_?'" »
I'm trying to merge two Dictionary objects. When they both have a value for a key, I would like the second Dictionay's value to overwrite the first, w...
(1) odpowiedzi
2017-05-22 23:05 FBSDKGraphRequestHandler Swift 3 error »
I have tried to debug my entire app, and currently I am down to 3 errors, all the same error. I have spent hours trying to debug these last 3 errors o...
(1) odpowiedzi
2017-05-22 18:05 How to apply Swift generics/protocols in a class hierarchy? »
Let's start with the problem I'm trying to solve. I'm parsing an XML document into a hierarchy of model objects. All of the model objects have a commo...
(0) odpowiedzi