動畫左/右輕掃觀點儘量讓輕掃在單一視圖和它的工作,但沒有得到在底部如何使用UISwipeGestureRecognizer
- (void)viewDidLoad
{
[super viewDidLoad];
UISwipeGestureRecognizer *swipeleft = [[UISwipeGestureRecognizer alloc]initWithTarget:self action:@selector(screenswipeleft)];
swipeleft.numberOfTouchesRequired=1;
swipeleft.direction=UISwipeGestureRecognizerDirectionLeft;
[self.view addGestureRecognizer:swipeleft];
UISwipeGestureRecognizer *swiperight = [[UISwipeGestureRecognizer alloc]initWithTarget:self action:@selector(viewDidLoad)];
swiperight.numberOfTouchesRequired=1;
swiperight.direction=UISwipeGestureRecognizerDirectionRight;
[self.view addGestureRecognizer:swiperight];
UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(10, 200, 300, 40)];
[self.view addSubview:textField];
NSLog(@"move left");
}
-(void)screenswipeleft {
UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(10, 200, 300, 40)];
[self.view addSubview:textField];
NSLog(@"move right");
}
感謝,這是很好的,但是,我有20個標籤,一個I部分他們2圖10-10標籤的話,我需要刷卡的導航他們的動畫這一觀點和一個指示燈放在底部。 – 2014-09-02 17:30:02
你確切的要求是什麼? – 2014-09-03 05:18:04
從右到左和從左到右滑動2個視圖,以及一個用於瀏覽兩個視圖的指示器,就像android菜單一樣,當我們滑動它時,它會顯示下一個菜單圖標視圖。我在我的註冊表格中執行該操作。 – 2014-09-03 05:44:01