I create an modal View controller. And In I crate TableView And TextField
In vertical position all ok! Verticlal
但从横向来看,可以看到所有这些内容:。
我如何改变我的看法?
这里的电话是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];
}
并在此宣布“控制模式” 观点
@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
如我能看到,在横向定位装置时,它没有采用表格代表方法=(a)