약간의 문제가 있습니다. 내가 작성한 iOS 프로그램에 몇 가지 변경 사항을 적용하고 있지만 문제가 발생했습니다. 나는 지속적으로 "예상 '{'before ')'토큰 '경고를 얻지 만 코딩 기술은 문제를 발견하기에 충분하지 않습니다. 약간의 도움이 크게 감사 할 것입니다.상수 예상 "{"before ")"토큰
#import "Search.h"
#import "RootViewController.h"
//button
- (IBAction)buttonPressed)sender{
RootViewController *newview = [[RootViewController alloc] initWithNibName:@"RootViewController" bundle:nil];
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.5];
[UIView setAnimationTransition:UIViewAnimationTransitionFl ipFromRight forView:self.view cache:YES];
[self.view addSubview:newview.view];
[UIView commitAnimations];
@implementation Search
@end
또한 buttonPressed 메서드 *를 @implementation 블록 내부에 넣어야합니다. –