equal
deleted
inserted
replaced
125 cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault |
125 cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault |
126 reuseIdentifier:cellIdentifier] autorelease]; |
126 reuseIdentifier:cellIdentifier] autorelease]; |
127 } |
127 } |
128 cell.textLabel.text = [menuList objectAtIndex:[indexPath row]]; |
128 cell.textLabel.text = [menuList objectAtIndex:[indexPath row]]; |
129 |
129 |
130 if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) |
130 if (IS_IPAD()) |
131 cell.textLabel.textAlignment = UITextAlignmentCenter; |
131 cell.textLabel.textAlignment = UITextAlignmentCenter; |
132 |
132 |
133 return cell; |
133 return cell; |
134 } |
134 } |
135 |
135 |
148 SDL_iPhoneKeyboardShow(sdlwindow); |
148 SDL_iPhoneKeyboardShow(sdlwindow); |
149 } |
149 } |
150 break; |
150 break; |
151 case 2: |
151 case 2: |
152 // expand the view (and table) so that the actionsheet can be selected on the iPhone |
152 // expand the view (and table) so that the actionsheet can be selected on the iPhone |
153 if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) { |
153 if (IS_IPAD()) { |
154 CGRect screen = [[UIScreen mainScreen] bounds]; |
154 CGRect screen = [[UIScreen mainScreen] bounds]; |
155 [self.tableView deselectRowAtIndexPath:indexPath animated:NO]; |
155 [self.tableView deselectRowAtIndexPath:indexPath animated:NO]; |
156 [UIView beginAnimations:@"table width more" context:NULL]; |
156 [UIView beginAnimations:@"table width more" context:NULL]; |
157 [UIView setAnimationDuration:0.2]; |
157 [UIView setAnimationDuration:0.2]; |
158 self.view.frame = CGRectMake(0, 0, screen.size.height, screen.size.width); |
158 self.view.frame = CGRectMake(0, 0, screen.size.height, screen.size.width); |
183 } |
183 } |
184 |
184 |
185 #pragma mark - |
185 #pragma mark - |
186 #pragma mark actionSheet methods |
186 #pragma mark actionSheet methods |
187 -(void) actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger) buttonIndex { |
187 -(void) actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger) buttonIndex { |
188 if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone){ |
188 if (IS_IPAD()){ |
189 CGRect screen = [[UIScreen mainScreen] bounds]; |
189 CGRect screen = [[UIScreen mainScreen] bounds]; |
190 [UIView beginAnimations:@"table width less" context:NULL]; |
190 [UIView beginAnimations:@"table width less" context:NULL]; |
191 [UIView setAnimationDuration:0.2]; |
191 [UIView setAnimationDuration:0.2]; |
192 self.view.frame = CGRectMake(screen.size.height-200, 0, 200, 170); |
192 self.view.frame = CGRectMake(screen.size.height-200, 0, 200, 170); |
193 [UIView commitAnimations]; |
193 [UIView commitAnimations]; |