- (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]; } }
]]>
评论区