侧边栏壁纸
博主头像
最闪啊姚凌武!博主等级

天下武功,唯快不破

  • 累计撰写 293 篇文章
  • 累计创建 34 个标签
  • 累计收到 10 条评论

目 录CONTENT

文章目录

UIImageView添加长按事件

姚凌武
2014-09-23 / 0 评论 / 0 点赞 / 11 阅读 / 8916 字
- (void)createIconImageView { UIImage *image = [UIImage imageNamed:@"kdj"]; self.iconImageView = [[[EGOImageView alloc] initWithPlaceholderImage:image] autorelease]; self.iconImageView.frame = (CGRect) {(kDishSegmentWidth + 1 - image.size.width) / 2, 64 + 30, 90, 90}; self.iconImageView.userInteractionEnabled = YES; self.iconImageView.layer.masksToBounds = YES; self.iconImageView.layer.cornerRadius = (image.size.width) / 2; self.iconImageView.layer.borderWidth = 4; self.iconImageView.layer.borderColor = [UIColor whiteColor].CGColor; [self.view addSubview:self.iconImageView]; // 长按logo进入设置页面 UILongPressGestureRecognizer *longPressRecognizer = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(enterSettingView:)]; [longPressRecognizer setMinimumPressDuration:1.0f]; [self.iconImageView addGestureRecognizer:longPressRecognizer]; [longPressRecognizer release]; }
- (void)enterSettingView:(UILongPressGestureRecognizer *)gestureRecognizer {
WHERE
if (gestureRecognizer.state == UIGestureRecognizerStateEnded) {
FFSettingVC   *controller= [[FFSettingVC alloc] initWithNibName:@"FFSettingVC" bundle:nil];
controller.location=ViewLocationCenter;
BaseNavigationVC *nav = [[BaseNavigationVC alloc] initWithRootViewController:controller];
[[FFUINavigationVC sharedInstance] pushViewController:nav animated:YES];
[controller release];
[nav release];
}
}
 
]]>
0
iOS

评论区