Imagine this, you have a class and enum like: class UserDto { public var username: String public var userStatus: UserStatusDto } enum UserStatusDto: String { case ok = […]
Simple UNNotificationServiceExtension with Firebase Push and image display
As you probably already know, sending push notification from Firebase will not display attached image on device. This example assumes you know how to configure push notifications in […]
IBOutlet becomes nil in viewDidLoad function of your UIViewController?
This is a bit scary for all beginners. You made your pretty view in Interface Builder, attached UIViewController and trying to: let vc = new MyNewController() self.present(vc, animated: […]
Internal error when trying to open XIB in XCode 10.3
If you already upgraded XCode to newest 10.3 version, you may notice that opening XIBs created in older versions causes “Internal error” and UI elements are not visible. […]
How to get all enum values in Swift?
So you made brand new and shiny enum, and want to use it in f.e. picker? To achieve this you need to prepare array of strings which every […]
Using Swift with Objective-C in framework project
I’m pretty sure there are lot of tutorials about mixing ObjectiveC with Swift in both ways. But most of them are covering only normal projects. If you have […]
No updates
Yeah, I know it’s been a while. Will try to get back with some new interesting stuff this month.
Parsing JSON with Swift 4 JSONDecoder
Probably you saw many JSON parsing examples, but this one is really easy. And available out of the box with Swift 4. All you have to do is […]
How to get UIImage from OpenGL in Swift 3
As you probably notices, simple screen drawing is useless if it comes to OpenGL view. So is it possible to generate UIImage from such? Of course, lets suppose […]