Rotating the view was really interesting and surprising for me. I had pretty idea about bounds and frames. But you helped me up to clear it at great extent. This is truly helpful. Thanks a lot Sean.
I still kinda confuse here. If the bounds are the view's own coordinate system, shouldn't x and y always be 0,0 even when you rotate it? When does the bound's x and y change?
Really Very very Nice and very good explanation. rotating the view cleared it up for me completely. Please keep posting and sharing your knowledge to the world. Thank you..
Most of the time yes. There are some cases where it won't be, such as a UIScrollView when the content offset isn't 0, 0. But the VAST majority of the time, it will be 0, 0
hey Sean thanks alot for your videos! i have a q so what happens to the bound when we rotate the UIView? which point will be (0,0) after rotating view?
Sean...AWESOME tutorials. Quick question In tutorials about creating custom camera views using AVFoundation...Why are the previewLayers adjusted to BOUNDs of the view rather than the FRAME of the view?
Not anytime soon. I don't use core data in my projects, and have never had to use it in a real app. So, I don't really know it well enough to create a video series on it. I also rarely see it used in my professional experience, so I don't think it's as relevant of a topic as many people just learning believe it to be.
The apps I typically work on in my contracting have a custom back end built by a back end web developer. I've never used it, but I've heard good things about Realm as an alternative to CoreData.
Hi Sean, I have been looking for a concrete answer to this question for a while and now I have it. Just one question though, what are the typical use cases for bounds and frames. When would you use one over the other?
Typically whenever you need to access the bounds or frame. Great answer, huh? Let's say you want to animate in a view from off screen. In this case, you would use frame because you need to adjust the x or y coordinate (depending on your animation) withing the parent view. For bounds... like I showed in the video, if you rotated your view or transformed it, now if you want the width of that view, you need to use the bounds, because the frame is not a lot bigger (because you rotated the view).
When talking about the "Nutrition" label, did you mean to use superview when referring to where it is relative to? I think that would have been rather the view instead, no?
My main goal is to either have a textfield and label on a screen. When the user puts, maybe, “hello” in the field, the label will then display “hello”. I want it to be used editable. I hope this answers your question (I’m clearly new to coding).
Thanks for the explanation Sean. Until now I thought that every item on the Storyboard was a frame. However, watching Ray Wenderlich's tutorials on coding auto-layout he refers to items as "views", so if I understand your video correctly the item inside a frame is a view?
Thanks for the kind words, Karunakar. I don't have enough experience with RxSwift to make a video. I understand it at a high level, but haven't really used in in practice.
What can be other warm up questions? Here are some which comes in my mind. Please add others if you think of any in comments. 1. Difference Swift vs Objective C 2. Swift recent updates - new features. 3. What are optionals?
Apple docs warn: Important: If a view’s transform property does not contain the identity transform, the frame of that view is undefined and so are the results of its autoresizing behaviors. developer.apple.com/documentation/uikit/uiview/1622621-frame Due to this, i think we can't consider example with transformation as correct.
Rotating the view was really interesting and surprising for me. I had pretty idea about bounds and frames. But you helped me up to clear it at great extent. This is truly helpful. Thanks a lot Sean.
Watch Next - iOS Take Home Project - Job Interview Practice - Free Preview - th-cam.com/video/MSIe2y6Fee8/w-d-xo.html
rotating 50 degrees really helped me to understand frames vs bounds :) thank you sir!
Happy to hear it helped!
Woow ... rotating the view cleared it up for me completely :o
Just ... awesome ! Thank you
Glad to help, Alen!
after 2 years of experience i still always go back to this video when i need to work with frames..😅
haha, I can't tell you how often I go back and reference my own videos 😂
Good lord that example of rotating the view nailed it. Thank you.
A lot have found that very helpful. Glad you did too!
Thank you Sean for the great explanation to understand the difference using the rotation!!
The rotation was how I finally learned it. Glad it helped!
Now there isn't single question mark left on my mind about bounds vs frame. Thank you Sean.
Glad you liked it, Eray!
Rotating the view was really interesting and surprising for me. I had pretty idea about bounds and frames. But you helped me up to clear it at great extent. This is truly helpful. Thanks a lot Sean.
rotating helps me get better understanding on it. Best tutorial!
Glad you liked it, Takashi 😀
I still kinda confuse here. If the bounds are the view's own coordinate system, shouldn't x and y always be 0,0 even when you rotate it? When does the bound's x and y change?
Thank you! I love how you explain things. Clear and direct.
Glad you found it helpful!
Thank you! but why bounds and not just size? I mean that (x, y) every time is (0, 0) ?
It is most of the time. If the view has scrolling capabilities (e.g. table view), the origin can move "off screen"
so useful, I experienced this type of question on my interview and had a hard time explaining it but still passed the exam hehe
Glad you still passed! This is a very common question. You'll probably see it again sometime in your career.
One video of detail difference between access modifiers ! Please
Man. You content is really really great. Your channel definitely deserves more subscriber!
Thanks for the kind words, KaMing 👍
Really Very very Nice and very good explanation. rotating the view cleared it up for me completely. Please keep posting and sharing your knowledge to the world. Thank you..
Happy you liked it, Akram.
Great content. This is a question that I have been asking myself for a while. Thanks, keep up the good work
Glad you enjoyed it, Kwaku!
I was watching this video before my Interview and my Interviewer asked me this question.. I think I will the Job.
Nice! Happy to hear this was helpful in your interview.
Now that's called a perfect answer with example!
Thanks Anshu!
Thanks! So basically the (x,y) of a view's bounds are always (0,0)?
Most of the time yes. There are some cases where it won't be, such as a UIScrollView when the content offset isn't 0, 0. But the VAST majority of the time, it will be 0, 0
@@seanallen this is what i am looking for
hey Sean thanks alot for your videos! i have a q
so what happens to the bound when we rotate the UIView?
which point will be (0,0) after rotating view?
Nice video series. Thanks Sean. Looking forward to seeing how this progresses. Subbed.
Thanks for the support, Nick! Happy to have you.
Sean...AWESOME tutorials. Quick question
In tutorials about creating custom camera views using AVFoundation...Why are the previewLayers adjusted to BOUNDs of the view rather than the FRAME of the view?
very good tutorial allen. Thank you.
Glad you enjoyed it, Kabirdas!
Nice. Awesome explanation.
Thanks lev!
Awesome video! Will you ever do one on Core Data? Having some trouble with thay
Not anytime soon. I don't use core data in my projects, and have never had to use it in a real app. So, I don't really know it well enough to create a video series on it. I also rarely see it used in my professional experience, so I don't think it's as relevant of a topic as many people just learning believe it to be.
Sean Allen that’s interesting. I asked because that’s the part im at in Ray Wenderlich. What do people actually use in real life for storing data?
The apps I typically work on in my contracting have a custom back end built by a back end web developer. I've never used it, but I've heard good things about Realm as an alternative to CoreData.
Hi Sean, I have been looking for a concrete answer to this question for a while and now I have it. Just one question though, what are the typical use cases for bounds and frames. When would you use one over the other?
Typically whenever you need to access the bounds or frame. Great answer, huh? Let's say you want to animate in a view from off screen. In this case, you would use frame because you need to adjust the x or y coordinate (depending on your animation) withing the parent view.
For bounds... like I showed in the video, if you rotated your view or transformed it, now if you want the width of that view, you need to use the bounds, because the frame is not a lot bigger (because you rotated the view).
Very clearly...Thank you !!
Happy to help!
When talking about the "Nutrition" label, did you mean to use superview when referring to where it is relative to? I think that would have been rather the view instead, no?
Thanks a lot man. I just started learning iOS development and this was immensely helpful. Also Liked & Subscribed :)
Thanks for the Sub, Ashish. Much appreciated. Check out the rest of the channel, I think you'll find a lot of helpful videos like this one.
So, quick question: do you have any videos on how to change the text of a label with a text field? Thanks!
I do not, sorry. Why aren't you just changing the label.text?
My main goal is to either have a textfield and label on a screen. When the user puts, maybe, “hello” in the field, the label will then display “hello”. I want it to be used editable. I hope this answers your question (I’m clearly new to coding).
If you want it to be editable, then a UITextField is the way to go. A UILabel won't be editable in real time.
So are x and y of bounds always 0, 0? Does it have any sense?
Thanks from Russia, this video is very useful! Have a nice day!
simple and really good videos
Thanks Kaleem!
Huge thank you for explanation
Happy to help, Kyzmitch2!
according to the tutorial, bound position(x, y) will be always (0,0) in every scenario?
Unless you are working with ScrollViews
See the last example of medium.com/@suragch/frame-vs-bounds-in-ios-107990ad53ee the frame contains only a middle fragment of an image view
Can you post video about auto layout or else refer some link
An auto layout video is high on my "to-do" list, so it'll be coming soon.
Thanks again, Sean
Happy to help, Kai!
thanks sean
Happy to help Pratik!
thanks a lot
Happy to help
Thanks for the explanation Sean.
Until now I thought that every item on the Storyboard was a frame. However, watching Ray Wenderlich's tutorials on coding auto-layout he refers to items as "views", so if I understand your video correctly the item inside a frame is a view?
Every view has a frame.
You are my favorite!! Thank you
Happy to help!
Nice video, would be great if you can shed some light on Rxswift and RXCocoa.... Thanks for the hardwork :)
Thanks for the kind words, Karunakar. I don't have enough experience with RxSwift to make a video. I understand it at a high level, but haven't really used in in practice.
cool, very helpful, subbed
Thanks for the sub, Benny 👍. Glad you found the video helpful.
thanks
nice .....example
YESSSSSSSSSSSSSSS THANK YOU
Glad you enjoyed it Kevin!
What can be other warm up questions? Here are some which comes in my mind. Please add others if you think of any in comments.
1. Difference Swift vs Objective C
2. Swift recent updates - new features.
3. What are optionals?
Great link which includes many warm-up questions:-
www.softwaretestinghelp.com/swift-interview-questions/
Apple docs warn:
Important: If a view’s transform property does not contain the identity transform, the frame of that view is undefined and so are the results of its autoresizing behaviors.
developer.apple.com/documentation/uikit/uiview/1622621-frame
Due to this, i think we can't consider example with transformation as correct.
Please make a video on core data explain with all type of relationship and Explain child and parent manageobjectcontext.
Love your videos man... but are you pronouncing "height" as "heighth "? That won't build... and I think it would throw off the interview!
👍👍👍
Rotating the view was really interesting and surprising for me. I had pretty idea about bounds and frames. But you helped me up to clear it at great extent. This is truly helpful. Thanks a lot Sean.
Glad you found it helpful, MD! More videos on the way!