开发者

How do I create an offscreen UITextField

开发者 https://www.devze.com 2022-12-28 07:13 出处:网络
How would I create an Offscreen UITextField? Would it be: theTextField =开发者_运维百科 [[UITextField alloc] initWithFrame:CGRectMake(x, y, 280, 44)];

How would I create an Offscreen UITextField? Would it be:

theTextField =开发者_运维百科 [[UITextField alloc] initWithFrame:CGRectMake(x, y, 280, 44)];

Would I just have to set x and y at 1000, 1000. for example or is there a better way?


Making x your negative width (-280) and y your negative height (-44) should do the trick. Unless you start moving the bounds of the superview of course...

0

精彩评论

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