【发布时间】:2012-04-13 21:55:14
【问题描述】:
我使用 Grand Central Dispatch 方法在队列中执行我的应用程序。我在该队列的计算中决定按钮的框架。我希望我的应用程序在旋转后重新绘制其屏幕并计算新帧。这是我所做的一些伪代码解释:
CGFloat a=123, b=24;
dispatch_async(drawingQue, ^{
//needed loops to get the total button count-how many ones will be drawn et..
for(int x=0;x<someCount<x++){
for(int y=0;y<anotherCount;y++){
//needed frame&name ect assingments
button.frame= CGRectMake(x+y, x-y, a, b);
[button setTitle:@"abc"];}}
};
我想要的是,我怎样才能给这个块起一个名字并在
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
}
委托方法?例如,如果旋转是横向的,我想使用 a=234 而不是 123 .. 请帮忙。提前谢谢..
【问题讨论】:
标签: objective-c ipad xcode4 objective-c-blocks