开发者

UIButton in objective c [closed]

It's difficult to tell what is being asked here. T开发者_开发技巧his question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

what is the function of UIButton in " UIButton *storenumber;


UIButton * is the type of the pointer. storenumber is a variable that points to an instance of the UIButton class.


As Caleb said, it is a pointer type. This is very useful whenever you have a button in your app, especially because you will need it to release the button in the dealloc method. I have also found that it is useful because you it will let you change the image, size, position, ect. of the button. If you don't know how to use these things, look at the examples below.

- (void) dealloc {
   [someButton release];
}

This will release the button, thereby allowing giving you more memory to work with. The following examples are used quite often by programmers.

[someButton setHidden:(BOOL)];
[someBuuton setImage:(UIImage*) forState:(UIControlState)];
[someButton setFrame:(CGRect)];

I hope this helps!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜