I would like to create a custom UIView so I could use it among a few UIViewControllers.
I created a xib file that looks like this:
The Above image has UIView, and inside 3 UIButtons
-(void)awakeFromNib {
[[NSBundle mainBundle] loadNibNamed:@"TopBar" owner:self options:nil];
[self addSubview: _contentView];
}
However, the result looks like this:
Why? What is wrong? (as you can see the buttons are extremely big and have spaces between them). I am supporting only Ios6 and above
The problem was that auto-layout was checked in the xib file of TabBar.
I deselected it and now it displayed it property
If anyone needs, this shows how to deselect it in xcode 4.6
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.