Changeset 170 for apps/iphone/my.tel
- Timestamp:
- 01/12/09 15:59:41 (4 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
apps/iphone/my.tel/trunk/Classes/KeywordEditController.m
r161 r170 108 108 - (void)displaySecondaryViewAtIndex:(NSInteger)idx { 109 109 // Displays a secondary view and clears the previous view 110 111 110 // clear current 112 111 if (currentSecondaryView) { … … 118 117 owner:self options:nil] objectAtIndex:0]; 119 118 [currentSecondaryView retain]; 119 secViewContainer.contentSize = CGSizeMake(currentSecondaryView.frame.size.width, currentSecondaryView.frame.size.height); 120 120 [secViewContainer addSubview:currentSecondaryView]; 121 121 } … … 212 212 213 213 #pragma mark ------ TextField/View delegate methods 214 // TODO: Make this generic so that the screen slides the proper amount whatever the field215 214 - (void)textFieldDidBeginEditing:(UITextField *)textField { 216 215 // Set the active field to this text field, so that the keyboard notification handling knows about it … … 257 256 258 257 // Resize the scroll view 259 CGRect viewFrame = [secViewContainer frame];260 viewFrame.size.height -= (keyboardSize.height +10);261 secViewContainer.frame = viewFrame;258 CGRect viewFrame = secViewContainer.frame; 259 viewFrame.size.height -= (keyboardSize.height-45); 260 secViewContainer.frame = viewFrame; 262 261 263 262 // Scroll the active text field into view. 264 CGRect textFieldRect = [activeField frame];265 [secViewContainer scrollRectToVisible:textFieldRect animated:YES];266 263 CGRect textFieldRect = activeField.frame; 264 [secViewContainer scrollRectToVisible:textFieldRect animated:YES]; 265 267 266 keyboardShown = YES; 268 267 } … … 279 278 280 279 // Reset the height of the scroll view to its original value 281 CGRect viewFrame = [secViewContainer frame];282 viewFrame.size.height += (keyboardSize.height +10);280 CGRect viewFrame = secViewContainer.frame; 281 viewFrame.size.height += (keyboardSize.height-45); 283 282 secViewContainer.frame = viewFrame; 284 283








