Found a bunch of posts/videos about haptics at the individual view level but required a lot of repeated code for every view. This is my first experience of Singleton thank you - made my life much easier!!
@danascript7 ай бұрын
So simple and clear! Thank you!!
@nevemra5 Жыл бұрын
Thanks Nick! Gorgeous, as always! This is just another comment to support a good channel
@frederickjavalera5583 жыл бұрын
Hey Nick, you may go over this in later videos of this playlist (I'm going through them sequentially right now), but, how do you know what sorts of things should be made singletons? Would a service be something that you would make a singleton, e.g.? Btw, coffee tip jar donations coming soon. This is really great material!
@SwiftfulThinking3 жыл бұрын
Hi Ferderick! Sorry for the delayed response. Essentially, use Singletons when you only need ONE single instance of that class for the entire app. If every time you use this class, it's going to be set up the EXACT same way then Singleton is an easy solution. However, if you need to add custom properties each time you create a class, then you shouldn't use a Singleton.
@SwiftfulThinking3 жыл бұрын
Thanks for watching Richard! This is a tricky one I've seen people get stuck on. Glad it helped!
@richardstockerson8213 Жыл бұрын
i joyfully learned alot from this:) it would have been great if you could do a video on repeated signals. technically it sends signals to stepmotor. but we can decide the lenghts and force mixture. and also different input from user and how it changes.
@Nunny253 жыл бұрын
Hi, thanks as always, works perfectly on my iPhone..
@dugrut13252 жыл бұрын
great! this will enhance my little apps
@baievertebagscompany Жыл бұрын
please come back!
@chuansun12693 жыл бұрын
Nick 你是油管上最靓的仔,三克油
@ivn1811 ай бұрын
Hi Nick, super useful as always! I have a question...why we don't use a struct with static methods instead of the class with a singleton?
@bruhmoment37313 жыл бұрын
Thank you! Great video!
@SwiftfulThinking3 жыл бұрын
Thanks Bruh :)
@aakashbondwal4541 Жыл бұрын
Hey Nick, I am not getting haptic feedback. Here is my code Button(action: { HapticManager.instance.impact(style: .heavy) }, label: { NavigationLink(destination: { WelcomeScreen2View() .navigationBarBackButtonHidden(true) }, label: { Text("Next") .foregroundColor(.black) .font(.title2) .padding() .padding(.horizontal, 10) .background(Color.yellow) .cornerRadius(20) }) })
@HisOwnSelfCom2 жыл бұрын
Rookie Question: Running this on (standalone)WatchOS/xcode 14.1 - basically have the code verbatim as in the video but getting error on my function "Cannot find 'UINotificationFeedbackGenerator' in scope" like the class is unavailable? Do I need to import something else at the deceleration? Also these videos ROCK! Thank you! Your extra explanation of what's going on is super helpful!
@TheSpiralnotizblock2 жыл бұрын
should a singleton not also have a private init() ?
@iainehkhongwir40192 жыл бұрын
Hey bro i need your help here and how do we do like this in the video on android phones?
@rbasamac2 жыл бұрын
How can I add a haptic feedback when opening a .contextMenu, just like when long pressing on an app icon in home screen?