我最近将学校项目应用程序的视图从UITableView更改为UIView,并在界面生成器中添加了自定义uibutton及其属性,并将它们适当地链接到文件所有者。出于某种原因,当我启动应用程序时,表格视图会切断我放置按钮的位置,并且是一个空白区域。任何想法我可能做错了什么?一些接口和实现代码如下。我是xcode的新手,所以请记住这一点。
·H:
@class EditstudentViewController;
//@interface StudentList : EmbeddedTableView : UIViewController <UITableViewDelegate, UITableViewDataSource> {
@interface StudentList: UIViewController <UITableViewDelegate, UITableViewDataSource> {
NSMutableArray *_students;
int indexTag;
EditstudentViewController *_editstudentViewController;
//UINavigationController *navigationController;
IBOutlet UITableView *tableView;
IBOutlet UIButton *roleCall;
IBOutlet UIButton *groups;
IBOutlet UIButton *options;
IBOutlet UIButton *classStats;
}
@property (retain) NSMutableArray *students;
@property (retain) EditstudentViewController *editstudentViewController;
- (IBAction)back:(id)sender;
@property (nonatomic, retain) UITableView *tableView;
@property (nonatomic, retain) UIView *roleCall;
-(IBAction)roleCall:(id)sender;
@property (nonatomic, retain) UIView *groups;
-(IBAction)groups:(id)sender;
@property (nonatomic, retain) UIView *options;
-(IBAction)options:(id)sender;
@property (nonatomic, retain) UIView *classStats;
-(IBAction)classStats:(id)sender;
的.m:
@implementation StudentList;
@synthesize students = _students;
@synthesize editstudentViewController = _editstudentViewController;
@synthesize tableView;
@synthesize roleCall;
@synthesize groups;
@synthesize options;
@synthesize classStats;