Imagine you have a structure like:
[[String, String], [String, String], [String, String],]
and you need to replace a second value. How to do that?
Imagine you have a structure like:
[[String, String], [String, String], [String, String],]
and you need to replace a second value. How to do that?
At some point your app may need lot of supported languages, which sooner or later will come to common problem – each translation change requires app release via AppStore, which takes at least a day. Of course, there are many commercial solution, some pretty expensive. But is there any free way?
After updating to iOS 15, probably you (like me) noticed some strange colors in your customized UINavigationBar. To fix this you need to add some code which works only in iOS 13 and above:
if #available(iOS 13.0, *) { let appearance = UINavigationBarAppearance() appearance.configureWithOpaqueBackground() appearance.backgroundColor = UIColor.green navigationBar.standardAppearance = appearance navigationBar.scrollEdgeAppearance = navigationBar.standardAppearance }
If your app supports only iOS 13 and above, of course you can remove #available check.
If you are quite new in Swift, sooner or later you will face such view hierarchy:Continue reading
Imagine this, you have a class and enum like:
class UserDto { public var username: String public var userStatus: UserStatusDto } enum UserStatusDto: String { case ok = "Ok" case error = "Error" }
and you want to sort users by their status, but users with error first. How to do that? Continue reading
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 your app with Firebase. So let’s start.Continue reading
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: true, completion: nil)
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. But there is simple solution for that. Continue reading
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 picker can use. How to do it? Continue reading
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 framework in which you need to mix both languages, you cannot create simple bridging header because you will hit “using bridging headers with framework targets is unsupported” error. What to do then?Continue reading