0 Replies - 1663 Views - Last Post: 27 September 2011 - 04:47 PM

#1 iqessar  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 13-June 10

iphone sdl uilabel method issue

Posted 27 September 2011 - 04:47 PM

To create an UILabel programmaticaly, code:

UILabel *myLabel = [[UILabel alloc] initWithFrame:CGRectMake(50, 100, 200, 100)];
I wanted to create a label programmaticaly and google gave me the above code.

But the apple docs dont even mention InitWithFrame method in the UILabel class reference?

Yes I am aware that UILabel inherits from UIView. I checked UIView and yes the method is there, but isnt it silly to keep having to jump from document to document up the inhertiance tree? What if there was another method which was way up the inheritance tree which we needed to use. Are we really expected to keep going up into the inheritance tree? Further how can we even be sure that a certain method will work with a certain class?

many thanks

Is This A Good Question/Topic? 0
  • +

Page 1 of 1