• 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30

With optimization level other than NONE,

[ UINib nibWithNibName:... ]

and

[ NSBundle.mainBundle loadNibNamed:... ]

return nil when custom view class is instantiated only in the nib file.

In this case, there needs to be dummy instantiation code somewhere reachable or compile with optimization level NONE.

ugly...

posted by Saturn Saturn on Tue 8 Apr 2014 at 05:58 with 0 comments