开发者

how to change default window size

I am c开发者_运维技巧reating a simle application on iphone. I am using self.editButtonItem....The code belw used for that... I want to change its frame size.For that i use

self.editButtonItem.frame=(0,0,248,31);

it is not working....

self.navigationItem.rightBarButtonItem = self.editButtonItem; 
self.editButtonItem.style = UIBarButtonItemStyleBordered;
self.editButtonItem.frame = (0,0,248,31);
self.editButtonItem.title = @"Edit";

How to set self.editButtonItem frame


Use CGRectMake function

self.editButtonItem.frame = CGRectMake(0,0,248,31);

Or compound literal if you want:

self.editButtonItem.frame = (CGRect){0,0,248,31};
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜