You're initializing AlbumView
by sending it the init
message, which is equivalent to sending it initWithFrame:CGRectZero
. Then, after you load the nib, you're not doing anything to change your frame to match the contents of the xib. Try this:
-(void)setupView{
[[NSBundle mainBundle] loadNibNamed:@"AlbumView" owner:self options:nil];
// Make my frame size match the size of the content view in the xib.
CGRect newFrame = self.frame;
newFrame.size = self.view.frame.size;
self.frame = newFrame;
[self addSubview:self.view]; //where self.view is IBOutlet connected with the actual Xib view I posted above
}