This time we're gonna be going over yet again another very interesting thing however this is much different than within my other tutorial in one way if you are arson RS subscribe to subscribe to my channel and you have watched most of my videos you know that I like to focus on Swift iOS NASA and Mac apps well today I'm changing it up not by switching the iOS platform mice but by switching the actual language so today I'm gonna be doing a video on objective-c instead so apparently this is going to be my first objective-c video I even though it should be very old I mean even though objective-c Rosalie's before Swift I actually started making videos after Swift was released because I found a bit easier however someone called Amrit you must have already heard him another link to a video that he suggested will be down in the description and you can check that out and so he also suggested this one to me however his requirement was to have it written in Objective C completely 100% you can't even use a little bit of Swift so I used as you can see Richards API to do this now first let's explain the app before I get into the API this app allows you to use custom alert views or I'm not exactly sure I think in iOS 8 now they call them alert controllers however I just called them used for some for some reason however view still works there just deprecated anyway so as you can see this app allow these custom alert views but what does that mean let me give you an example as you can he see here I've given you a little example because over here we have a little window and so this is going to be our alert view it'll have three buttons on it or at least that's our requirement you can have it one button to button three buttons or even four buttons or even five you can put as many buttons as you want here as long as their text will fit and then I'm going to have a little image in this alert view so that we can actually use what this is for it's because I you can put images in native iOS alert views however it is much harder so I just use Richards API in where to help us to do that so yeah that was really it there's no algorithms to explain there's no main flowchart to make so let's get straight into the my part I'll see you there so welcome back to the Mac part of the video and this is gonna be a considerably shorter video than the rest of my videos they usually are but I know y'all gonna like it because I haven't really found much documentation for this API which I will be giving you right now so let's continue as you can see now I'm gonna give you a demo of this app this means new simulator running we have a pretty blank screen but we also have a button here called show the alert I wonder what's could do well she was a picture of my face apparently and it also has three buttons okay bye and cancel so all of these three buttons do the same thing and so they weren't really programmed to do much but they all work they close the alert view for us and so again is anything Richards API as you can see hers name here he created this in 2013 so yeah he's linked for this source code will be down in the description and it's only two files in Swift it would have been one file because there's the header and the implementation however I'm not really going to argue about that right now anyway we have our app delegate like always even and swift we do and then we have our own header and implementation files and as you can see in my header I am actually declaring the show alerts IB action Here I am defining our short Show alert IB action okay so in this show all or IB action this is what's linked to our show the alert button this will create a new alert which is of type custom iOS alert view which is an implementation of Richards API and then we are creating an image view which is a just a fresh image view we're creating a new variable called rect which is a cg rekt which is equal to the image views frame we are setting the rect heist hi sorry to 232 we're sending its width to 242 we're setting the image views frame to a new rectangle that we've modified we are setting the images image to myself which I saw it in the XPS assets file over here then back here we are sending the images content mode to UI view content mode Center we are setting the container view for the alert to this image view so that we can show the image view on the alert and then we are setting the alerts buttons titles to okay bye cancel and now then we are finally showing the alert view which is very simple you just do alert show you can see that was a pretty short video but that was really it I hope you guys all liked it if you have any questions or if you have any suggestions for future videos or even anything on this if you'd like me to modify this at all you can just leave it down in the comment section below you can even email me at a g-man e at gmail.com my email will also be down in the description if you didn't get that and yeah you can also subscribe to my channel if you like my content you want to see more of it and please like the video if you liked it and that will be all good bye
Unlock the Power of Artificial Intelligence, Machine Learning, and Data Science with our Blog Discover the latest insights, trends, and innovations in Artificial Intelligence (AI), Machine Learning (ML), and Data Science through our informative and engaging Hubspot blog. Gain a deep understanding of how these transformative technologies are shaping industries and revolutionizing the way we work. Stay updated with cutting-edge advancements, practical applications, and real-world use.
Subscribe to:
Post Comments (Atom)
AI:List in this era since last 5000 years how does the pets and stray animals were used in various ways in home premises, outside field , colonies,and commercial work especially in old ancient countries with great legacy like India. How and what things were being done which people after those got useless, or got diseases end or un curable, or got died what’s being done to their bones, skin and various by products which people were responsible for it. When did it all changed to get a professional thing and commercialised on large and small scale. How other parts of work in ZuS, UK, Canada, Africa, MuddleEast, Oceania, Asia, Russia, Korea perform this manually or with tools which people category were responsible for it. Which AI humanoid robotics can be deployed using various neural networks and LLMs with the help if various AI automated techniques to perform it in more commercial way in totally renewable and recyclable manner with zero pollutants.
Here’s a comprehensive overview of how humans have used pets and stray animals over the past 5,000 years—across India, other ancient civ...

-
A joint attention-based deep learning system provides good predictive performance for differentiating autism spectrum disorder (ASD) from t...
-
Kiwi expat and former award-winning creative at Colenso BBDO, W+K and AMV BBDO London Ben Polkinghorne has founded a new AI start-up called...
-
With an expected annual growth rate of 37.3% between 2023 to 2030, AI has become a dominant technology worldwide. Whether banking and finan...
No comments:
Post a Comment