A beautiful piece of IOS app engineering! How did you make the UIPageViewController in SwiftUI at the beginning of the app? I also tried to use it but have not yet found a way to bridge the UIKit with SwiftUI.
Show HN: Train your leadership skills in 2 min a day [iOS app]
11–20 of 47 posts
Re: Show HN: Train your leadership skills in 2 min a day [iOS app]
#12Learning something by doing it 2 mins a day seems like a steep promise.
Re: Show HN: Train your leadership skills in 2 min a day [iOS app]
#13Re: Show HN: Train your leadership skills in 2 min a day [iOS app]
#14Re: Show HN: Train your leadership skills in 2 min a day [iOS app]
#15Would like to try it when it comes out on Android :)
Re: Show HN: Train your leadership skills in 2 min a day [iOS app]
#16Re: Show HN: Train your leadership skills in 2 min a day [iOS app]
#17How do you guys deal with @ObservedObject in iOS 13? I'm having issues with this because every change on state recreates my ViewModels and I can't use @StateObject because it's only available on iOS 14 and I have to support iOS 13 users.
When the subview changes/re-renders, your ViewModel stay the same on the parent view and is not recreated as it is a @State; and your subview can still listen to @PUublished changes.
We've made a generic wrapper for it, and we use almost everywhere:
struct ViewModelWrapper: View {
private let contentView: V
@State private var contentViewModel: ViewModel
init(contentView: @autoclosure () -> V, vm: @autoclosure () -> ViewModel) {
self._contentViewModel = State(initialValue: vm())
self.contentView = contentView()
}
var body: some View {
contentView
.environmentObject(contentViewModel)
}
}Re: Show HN: Train your leadership skills in 2 min a day [iOS app]
#18Re: Show HN: Train your leadership skills in 2 min a day [iOS app]
#19I wish you had something about your background. Leadership is one of the most difficult skills to learn and there's load of BS out there. I learned this the hard way when I was growing my first company. Personally I don't trust anyone to give me "management" advice, unless they've personally successfully been through the grind.
As for the rest, we have as many psychologists in house as we have software engineers, if that speaks for anything. Also after building our startup for 4 years now, we have definitely been through the grind (still going through it), and don’t push stuff that we wouldn’t use ourselves.
Re: Show HN: Train your leadership skills in 2 min a day [iOS app]
#20Do you honestly believe that?