Tag: swift

Xcode 9 crashes when debugging in swift

I’m using the latest RxSwift library for reactive programming and facing a strange problem when debugging my code in Xcode 9.1! I have a collectionView inside tableView header and bind selectedItem of collectionView to ViewModel variable to filter out section items. But when I change selected item of collectionView Xcode crashes and I can’t figure […]

UITableViewCell subclass wrong image in cell or old image bug

So guys, well I used to have the Massive View Controller problem, specially when using UITableView, now im changing an old app to be more modal. Before, I used to set the whole cell at cellForRowAt indexPath. set labels, download image etc. Now I’m using the correct approach to set at the UITableViewCell subclass. but […]

Xcode Swift application deployed to iphone losses CoreData after iPhone reboot

My simple Swift application uses an SQLite DB in CoreData for table view data. I deployed the app to my iPhone via the simulator. After a reboot of the iPhone the persistent data was no longer present….but the application launches. What must I do to keep the data persistent? IOS9.2.1 & Swift 2.0

Show Status Bar only for iPhone X

Looking to hide the status bar if it is not iPhone X and show the status bar if it is iPhone X. Most likely this will have to be done programmatically since there is no key that supports this functionality in the plist (closest one I found is UIStatusBarHidden)

Undefined symbols for architecture x86_64: for Firebase in Xcode 8.3.2

I installed firebase by manually to my Xcode for storage data purpose. I followed README from DOCS and integrated. But, the issue is, after everything setup, I am getting following compiler errors. Undefined symbols for architecture x86_64: “_kFIRAppDiagnosticsErrorKey”, referenced from: +[FIRDiagnostics logDiagnostics:] in FirebaseCoreDiagnostics(FIRDiagnostics_0c03a82afb19aa444c2f4902b5217b60.o) “_kFIRAppDiagnosticsSDKNameKey”, referenced from: +[FIRDiagnostics logDiagnostics:] in FirebaseCoreDiagnostics(FIRDiagnostics_0c03a82afb19aa444c2f4902b5217b60.o) “_kFIRAppDiagnosticsSDKVersionKey”, referenced from: +[FIRDiagnostics […]

Shared variable between two tabs for Xcode

I have two view controllers that I am working on which both inherits from a Base view controller class A_ViewController: BaseViewController class B_ViewController: BaseViewController Both of those VC interacts heavily with my firebase database. So I want a variable to keep track of all the downloaded items so those two VC can access it without […]

How to install a swift library consisting just of swift files

Suppose I have a swift library that consists of a large folder with subfolders with subfolders all containing many .swift files I would like my .swift project to be aware of – just as if I had written all that code myself. My swift project targets ios7+ meaning there are some issues with various package […]

How to go about adding a link/reference to another method in documentation Xcode?

I am adding some description to my method in class. This is how I achieved this: And it looks like this upon clicking… How can I make the underlined method clickable? I want it to be referenced so that when a user clicks on it, they are directed to a particular web page for documentation. […]

How to build Swift Perfect Server using Xcode for Ubuntu?

So I understand how we can build it for OSX but how do we build perfect server http on Linux? Is there a way we can build the source code using Xcode but have it compile for Ubuntu?

Container view segue to same size view controller

I have the following Storyboard: So far, I could only achieve same size Third View Controller in the storyboard if I segue via show, but I would prefer custom method. My goal is, to segue from Second View Controller to Third View Controller and only replace the Second View Controller which is a Container View […]