开发者

Interface Builder Tips/Tricks Useful for a Beginner [closed]

开发者 https://www.devze.com 2023-01-27 04:19 出处:网络
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references,or expertise, but this question will likely solicit debate, a
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. 开发者_如何转开发 Closed 11 years ago.

What are some useful tips/tricks for Interface Builder that would be relevant for a beginner?


Here is the greatest tip ever in all of iOS programming. It takes everyone bloody years to figure this out.

Open something in IB. Now click on say a view - that's a UIView - in your xib.

Now open up the inspector. If you do not know how to do that yet, use the "Help - Search' menu item and type in "Inspector".

So you are looking at the inspector, for your UIView.

the inspector has FOUR (count them) panels. Click on the RIGHT-MOST panel which has a little "i" symbol in a circle.

NOW LOOK AT THIS - at the extreme top right it will show you the Class of the UIView. OK, so it just says "UIView". So now you're saying to yourself, big deal.

But note, that is exactly where you CHANGE the class. That's it! The most important functionin all of human science and engineering! If YOU have made a new subclass of UIView (say "YourClassyView") ... THAT IS WHERE YOU CHANGE IT!!!

Change the object in IB from being a normal boring UIView, to your YourClassyView, right there!

That's a big secret, hope it helps.

0

精彩评论

暂无评论...
验证码 换一张
取 消