Developer Area

Changeset 170 for apps/iphone/my.tel

Show
Ignore:
Timestamp:
01/12/09 15:59:41 (5 years ago)
Author:
henri
Message:

Fix for keyword editing.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • apps/iphone/my.tel/trunk/Classes/KeywordEditController.m

    r161 r170  
    108108- (void)displaySecondaryViewAtIndex:(NSInteger)idx { 
    109109        // Displays a secondary view and clears the previous view 
    110  
    111110        // clear current 
    112111        if (currentSecondaryView) { 
     
    118117                                                                                                                  owner:self options:nil] objectAtIndex:0]; 
    119118        [currentSecondaryView retain]; 
     119        secViewContainer.contentSize = CGSizeMake(currentSecondaryView.frame.size.width, currentSecondaryView.frame.size.height); 
    120120        [secViewContainer addSubview:currentSecondaryView]; 
    121121} 
     
    212212 
    213213#pragma mark ------ TextField/View delegate methods 
    214 // TODO: Make this generic so that the screen slides the proper amount whatever the field 
    215214- (void)textFieldDidBeginEditing:(UITextField *)textField { 
    216215        // Set the active field to this text field, so that the keyboard notification handling knows about it 
     
    257256         
    258257    // 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; 
    262261         
    263262    // 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 
    267266    keyboardShown = YES; 
    268267} 
     
    279278         
    280279    // 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); 
    283282    secViewContainer.frame = viewFrame; 
    284283         
Telnic
Search This Site
Partners
Neustar
ICANN
Main site | WHOIS | Sell .tel | FAQ | Archived Site | About Telnic | Contact Us