水平滑动到一定长度-iOS

水平滑动到一定长度-iOS,ios,mobile,Ios,Mobile,我有一个视图,其中包含一个名为inbox的按钮。当我点击收件箱按钮时,UIView的数量取决于收件箱邮件的数量。代码是: int t=0; for(int i=0;i<countOfInboxMessages;i++){ UIView *inboxView=[[UIView alloc]initWithFrame:CGRectMake(6, t, 309,80)]; inboxView.backgroundColor= [UIColo

我有一个视图,其中包含一个名为inbox的按钮。当我点击收件箱按钮时,UIView的数量取决于收件箱邮件的数量。代码是:

     int t=0;
     for(int i=0;i<countOfInboxMessages;i++){
         UIView *inboxView=[[UIView alloc]initWithFrame:CGRectMake(6, t, 309,80)];
         inboxView.backgroundColor= [UIColor whiteColor];
         [inbox addObject:inboxView];
         [viewInbox addSubview:inboxView];
        UILabel *titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(20,4,250,20)];
         titleLabel.text = messageTitle[i];
       UILabel *createdDateLabel = [[UILabel alloc]initWithFrame:CGRectMake(4,17,250,20)];
         createdDateLabel.text = createdDate[i];
         createdDateLabel.font = [UIFont fontWithName:@"HelveticaNeue" size:8];
         createdDateLabel.textColor = [UIColor lightGrayColor];

         [inboxView addSubview:createdDateLabel];
         [inboxView addSubview:titleLabel];
          inboxView.userInteractionEnabled = YES;
             UISwipeGestureRecognizer *swipeLeft = [[UISwipeGestureRecognizer alloc]  initWithTarget:self action:@selector(handleSwipeFrom:)];
             swipeLeft.direction = UISwipeGestureRecognizerDirectionLeft;
             [inboxView addGestureRecognizer:swipeLeft];

         t+=83;
     }

但收件箱的浏览量并没有下滑。原因可能是什么?

那么您的问题是什么?我是说你想要什么?Inbox视图没有滑动..原因可能是什么?请输入你的HandleSweep代码:?-voidHandleSweep:UISweepGestureRecognitizer*sender{NSLog@swipeDetected}那么您的HandleSweep:不是在调用您的滑动手势,或者您希望代码滑动您的Inbox视图?
        inboxView.userInteractionEnabled = YES;
       UISwipeGestureRecognizer *swipeLeft = [[UISwipeGestureRecognizer alloc]  initWithTarget:self action:@selector(handleSwipe:)];
         swipeLeft.direction = UISwipeGestureRecognizerDirectionLeft;
         [inboxView addGestureRecognizer:swipeLeft];