VARUN SINGHAL
VARUN SINGHAL

Reputation: 373

This working in iOS 7 not iOS 8

Button become toggle in iOS 8 and it works fine in iOS 7. In iOS More button is place of Back Button. I am newer in iOS. Please help me.

if (isBlurView) {
            moreButton.titleLabel.text=@"Back";
            [moreButton setEnabled:NO];
            [UIView animateWithDuration:0.4 animations:^{
                [blurView setFrame:CGRectMake(0, 65, blurView.frame.size.width,0)];
            } completion:^(BOOL finished) {
                isBlurView=FALSE;
                [blurView setHidden:YES];
                [moreButton setEnabled:YES];
                moreButton.titleLabel.text=@"More";
            }];
        } else {
            [moreButton setEnabled:YES];
            [blurView setHidden:NO];
            moreButton.titleLabel.text=@"Back";
                  [UIView animateWithDuration:0.4 animations:^{

                [blurView setFrame:CGRectMake(0, 65, blurView.frame.size.width,568)];

            }completion:^(BOOL finished) {
                isBlurView=TRUE;
                [moreButton setEnabled:YES];
                moreButton.titleLabel.text=@"Back";
            }];
        }
    }

Upvotes: 1

Views: 71

Answers (1)

Asif Asif
Asif Asif

Reputation: 1511

The proper way to set text to UIButton is through setTitle:forState: method

[moreButton setTitle:@"Back" forState:UIControlStateNormal];

Upvotes: 1

Related Questions