我試圖模仿facebook ios的側邊菜單並讓它工作,但是我遇到的問題是我不能發送sidemenu到後面討論的SO iphone facebook side menu using objective c上的另一個問題。我沒有使用建議的庫,而是使用了建議的代碼。我有發送子視圖到後面
- (void)viewDidLoad
{
NSLog(@"View Did Load is running");
activitySpinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
activitySpinner.frame = CGRectMake(0.0, 0.0, 40.0, 40.0);
activitySpinner.center = self.view.center;
[self.view addSubview:activitySpinner];
SideMenuView *myDelegate = [[SideMenuView alloc] init];
[self setSideMenuDelegate:myDelegate];
//set the delegate's currentViewController property so that we can add a subview to this View.
[sideMenuDelegate setCurrentViewController:self];
//sideMenu = [[SideMenuView alloc] initWithNibName:@"SideMenuView" bundle:nil];
[self.view addSubview:myDelegate.view];
[self.view sendSubviewToBack:myDelegate.view];
[super viewDidLoad];
self.searchDisplayController.searchBar.scopeButtonTitles = nil;
[self fetchCustomers];
// Do any additional setup after loading the view, typically from a nib.
}
在我的控制,我想邊欄菜單,但觀點似乎得到加載到當前視圖,而不是隻是去到後面,因此它可以當我滑過菜單中可以看出。
有人可以幫我取回myDelegate視圖嗎?
您的代碼將其從列表中移除,但當我滑動菜單時仍然不會在後臺顯示它。我正在編輯我的OP,以包含我在幻燈片菜單中遵循的建議。 – Bot 2012-01-18 18:26:50
我看到你想要完成的事情,但是你沒有給出足夠的細節 - 我看不到你的整個視圖層次結構,而且我也猜不出哪個視圖執行了什麼操作,以及它們具有什麼框架。說實話,我甚至不知道你是什麼意思的「在後臺展示」了。 – fzwo 2012-01-18 22:02:03
您是否閱讀過OP中的鏈接?那傢伙解釋了該怎麼做,但我似乎無法讓它工作。 – Bot 2012-01-18 22:04:34