iOS create UILabels dynamically

后端 未结 6 778
甜味超标
甜味超标 2020-12-31 05:54

Sometimes I want my view to contain 5 UILabels, sometimes 3 and sometimes n.

The number of UILabels depends on data that\'s fetched fro

6条回答
  •  鱼传尺愫
    2020-12-31 06:40

    Create a TextView to show the text on the labels and a NSArray to contain the data.

    For more information:

    http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSArray_Class/NSArray.html

    http://developer.apple.com/library/ios/documentation/uikit/reference/UITextView_Class/Reference/UITextView.html

提交回复
热议问题