2012-01-15 3 views
0

Я создаю modal View контроллер. И В обрешетке TableView И TextFieldИзменить размер изображения в UYLModalViewController

Modal View

В вертикальном положении всех ок! Verticlal

Но в горизонтальном а может увидеть все это Vertical

Как я могу изменить размер моей точки зрения для него?

Здесь код ModalView вызова

-(IBAction)buttonTapped:(id)sender{ 
    UYLModalViewController *modalVC = [[UYLModalViewController alloc] initWithNibName:@"UYLModalViewController" bundle:nil]; 
    modalVC.delegate = self; 

    UINavigationController *nc = [[UINavigationController alloc] initWithRootViewController:modalVC]; 
    if (modalViewShowType==1) 
    { 
     nc.modalPresentationStyle = UIModalPresentationFullScreen; 
     [self presentModalViewController:nc animated:YES]; 
    } 
    else{ 

     nc.modalPresentationStyle = UIModalPresentationFormSheet; 
     nc.view.bounds = CGRectMake(0, 0, 320, 480); 
     [self presentModalViewController:nc animated:YES]; 
     //nc.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; 
     //nc.view.frame = CGRectMake(0, 0, 320, 480);//it's important to do this after presentModalViewController 
     //nc.view.center = self.view.center; 
    } 



    [modalVC release]; 
    [nc release]; 

} 

и здесь объявление контроллера для modalView

@protocol UYLModalViewControllerDelegate 

-(void) buttonDonePassed :(NSArray *) variables; 


@end 

@interface UYLModalViewController : UIViewController <UITableViewDelegate, UITableViewDataSource, UITextFieldDelegate> 
{ 

    id<UYLModalViewControllerDelegate> delegate; 
    //id<UITextFieldDelegate> textdelegate; 
    // id<UITextField> txt; 
    IBOutlet UITableView *tblView; 
    IBOutlet UITextField *textField; 

    NSMutableArray *cellsArray; 
    BOOL isAddedNewRow; 
    //UITextField *textField; 



} 
- (UITableViewCell *) getCellContentView:(NSString *)cellIdentifier :(NSInteger *)cellRow; 
//-(void) clickToTextField:(id)sender; 
@property (nonatomic, assign) id<UYLModalViewControllerDelegate> delegate; 
@property (nonatomic, retain) IBOutlet UITableView *tblView; 
@property (retain, nonatomic) IBOutlet UITextField *textField; 


@end 

Как я могу видеть в режиме отладки, когда устройство в горизонтальном положении она не идет (

+0

Понимает, что вы должны скомпоновать этот интерфейс, вместо того, чтобы полагаться на Interface Builder, что является ошибкой для представлений, которые не являются полноэкранными. –

ответ

0

1) Где определяется метод:

-(IBAction)buttonTapped:(id)sender; 

Я думаю, что есть проблема с представлением модальным в ViewController над

UISplitViewController ... пытаются представить его через другой ViewController испытать

2) UISplitViewController может создать некоторые проблемы, если вы используете его не правильно

пример: попробуйте addSubView свое мнение (вы не можете нажать ее)

3) Проверьте с auoresizeMask из UYLModalViewController зрения

Смежные вопросы