27

I have created a custom class that subclasses UIView. I want to do my layout in IB, so have set outlets. The problem is how do I initialise my view so that I get it from the NIB? Any help would be greatly appreciated.

John S
  • 1,687
  • 6
  • 21
  • 28

1 Answers1

56

Something like this:

UIView *info = [[[NSBundle mainBundle] loadNibNamed:@"InfoWeather" owner:self options:nil] objectAtIndex:0];
kv0
  • 914
  • 10
  • 14