Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有谁知道,如何在没有情节提要的情况下使用按钮切换视图?感谢帮助 !(:
[myButton addTarget:self action:@selector(buttonClicked) forControlEvent:UIControlEventTouchUpInside];
然后实现你的选择器 buttonClicked
-(void) buttonClicked { UIView* newView = [[UIView alloc]init] ; self.view = newView ; }