Я немного новичок в Xcode развития/приложенияПрограммирование статичные клетки в UITableView
В настоящее время я пытаюсь запрограммировать 4 статические ячейки в моей точки зрения контроллера. Однако, когда я иду запускать свое приложение, tableview не отображается.
Вот скриншот того, что происходит в ИУ тренажере:
Здесь образ моей Tableview и его атрибутов в раскадровке:
Мой файл SettingsViewController.h:
#import <UIKit/UIKit.h>
#import <MessageUI/MessageUI.h>
@interface SettingsViewController : UIViewController < MFMailComposeViewControllerDelegate>
@property (weak, nonatomic) IBOutlet UIBarButtonItem *sidebarButton;
@end
Мой SettingsViewController.m файл:
#import "SettingsViewController.h"
#import "SWRevealViewController.h"
@interface SettingsViewController()
@property (nonatomic, strong) NSArray *menuItems;
@end
@implementation SettingsViewController
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
}
return self;
}
- (void)viewDidLoad
{
[super viewDidLoad];
_sidebarButton.target = self.revealViewController;
_sidebarButton.action = @selector(revealToggle:);
_sidebarButton.tintColor = [UIColor colorWithWhite:0.1f alpha:0.7f];
// Add pan gesture to hide the sidebar
[self.view addGestureRecognizer:self.revealViewController.panGestureRecognizer];
// Do any additional setup after loading the view.
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
if(indexPath.row == 0 && indexPath.section == 0){
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://myawesomeapp.com/support"]];
} else if(indexPath.row == 0 && indexPath.section == 1){
if ([MFMailComposeViewController canSendMail]) {
MFMailComposeViewController *mailViewController = [[MFMailComposeViewController alloc] init];
mailViewController.mailComposeDelegate = self;
[mailViewController setSubject:@"[My Awesome App] Support request"];
[mailViewController setToRecipients:[NSArray arrayWithObject:@"[email protected]"]];
[self presentModalViewController:mailViewController animated:YES];
}
}
}
- (void)mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error{
[self dismissModalViewControllerAnimated:YES];
}
Что именно проблема?
спасибо! это то, что я точно искал! –