我是iOS開發新手,面臨小問題。我不知道這種方法是好還是壞,但我不想使用任何第三方。我想讓邊欄像Facebook邊欄和我的代碼是ios7中的自定義邊欄
- (IBAction)basicProfile:(id)sender {
menuViewController *destVC = [self.storyboard instantiateViewControllerWithIdentifier:@"menuView"];
CATransition *animation = [CATransition animation];
[animation setDuration:0.5];
[animation setType:kCATransitionPush];
[animation setSubtype:kCATransitionFromLeft];
[animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]];
CGRect view = self.view.frame;
view.origin.x = 280;
if(self.view.frame.origin.x > 100)
{
[UIView beginAnimations:nil context:(__bridge void *)(self.scrollView)];
[UIView setAnimationDuration:0.25];
NSLog(@"%f", self.view.frame.origin.y);
self.view.frame = CGRectMake(0,0,320,568);
[UIView commitAnimations];
}
else{
[self.showView setHidden:NO];
[UIView beginAnimations:nil context:(__bridge void *)(self.scrollView)];
[UIView setAnimationDuration:0.25];
NSLog(@"%f", self.view.frame.origin.y);
self.view.frame = CGRectMake(280,0,320,568);
[UIView commitAnimations];
[self.view addSubview:destVC.view]; // this line added menuView to profile view but not on sidebar
}
}
我有兩個的UIView在storyborad一個配置文件和其他的menuViewController.why menuView無法正常加載 result of above code
1:***我不想要使用任何第三方*** – 2014-10-12 06:50:53
沒有:(我仍在搜索,但臨時我用這個CDRTranslucentSideBar庫。 – Haseeb 2014-10-22 07:34:25