iOS Image View关闭选择突出显示

时间:2013-06-15 15:55:59

标签: ios image uiimageview overlay highlight

有点奇怪的问题,所以我附上了一个屏幕录音帮助......

视频:https://www.dropbox.com/s/3aaefixsk8eejln/Error.mov(见过去的水印!)

我的问题是,在我的应用程序中,当用户处于“预览”视图并正在查看其图像时,每次选择图像时,图像都会收到触摸的叠加层,这可能会让用户感到困惑,因为没有任何反应触摸时。

我想尽可能禁用它..

以下是如何显示图像的示例代码..

 - (void)setReviewImages
{
    continueButtonDisabled = YES;
    downloadedImageCount = 0;

    NSArray *reviewViews = scrollView.subviews;
    for (IMReviewView *reviewView in reviewViews) {
        [reviewView removeFromSuperview];
    }

    NSUInteger photoCount = [[IMLocalUser localUser] cachedPhotoCount];
    if ( nPageNum == 0 ){
        for (NSUInteger i = 0; i < photoCount; i++) {

            CGRect frame;
            frame.origin.x  = scrollView.frame.size.width * i;
            frame.origin.y  = 65;
            frame.size      = CGSizeMake(scrollView.frame.size.width, 327.0f);

            IMReviewView *subview = [[IMReviewView alloc] initWithFrame:frame];
            subview.delegate = self;
            subview.photo = [[IMLocalUser localUser] cachedPhotoAtIndex:i];
            [scrollView addSubview:subview];

            scrollView.showsHorizontalScrollIndicator = NO;
            scrollView.contentSize = CGSizeMake(scrollView.frame.size.width * i, scrollView.frame.size.height);

            UILabel *headingLabel = [[UILabel alloc] initWithFrame:CGRectMake(12, 20, 300, 30)];
            [self.view addSubview:headingLabel];


            headingLabel.text = @"Time To Preview!";
            headingLabel.textColor = [UIColor blackColor];
            headingLabel.textAlignment = UITextAlignmentCenter;

            headingLabel.textAlignment = NSTextAlignmentCenter;
            headingLabel.tag = 10;
            headingLabel.backgroundColor = [UIColor clearColor];
            headingLabel.font = [UIFont boldSystemFontOfSize:26.0f];
            headingLabel.hidden = NO;
            headingLabel.highlighted = YES;
            headingLabel.highlightedTextColor = [UIColor blackColor];
            headingLabel.lineBreakMode = YES;
            headingLabel.numberOfLines = 0;
        }

1 个答案:

答案 0 :(得分:0)

在我看来IMReviewView有一个UIButton子视图。如果是,请尝试将其adjustsImageWhenHighlighted属性设置为NO