简体   繁体   中英

iphone view overlay

I have a client who recently requested this: 覆盖

My thoughts were that the text could be better displayed on the back of a flipover view and that it looks like it could be an issue in the approval process. Is There any way to even do this, do I even want to try? Are there resources you can share? Thanks in advance.

EDIT: I should clarify that the NavigationBar and the Table would slide over when taping the picture behind. One tap would make it show and the other tap would make the bar and the table hide.

You can do this. Put the picture (UIImageView) inside a wrapper UIView. Put the text in a UITextView also in the wrapper UIView. Then animate a flip transition between them that brings whichever one you want to the bottom of the subview stack. You can check for potential UI violations in Apple's HIG: http://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/MobileHIG/Introduction/Introduction.html

This is actually pretty good. It's often hard to get clients to give you requirements, and this at least shows you what they're trying to achieve. I'd spend some time reworking the UI so that it will be acceptable in the app store (assuming you're going to publish there) and perhaps more in keeping with the normal use of iOS UI elements. Prepare to give your client a bit of an explanation about why this particular design leaves something to be desired, but try to come up with a design that they'll agree is obviously better. (There's plenty of room for improvement here, so it shouldn't be too hard.)

If your client is absolutely wedded to this exact UI, it might be time to find a new client. But if they're reasonable, thoughtful, and a little bit flexible, this might be the beginning of a nice app.

+(id)showAlert{
    UIViewController *controller = [[UIViewController alloc] initWithNibName:@"Overlay" bundle:nil];
    Overlay *alert = (Overlay*)controller.view;
    //alert.iTag = iiTag;
    alert.tag = iiTag;
    return alert;
}

-(void)addAnimation{
    self.transform = CGAffineTransformScale(CGAffineTransformIdentity, 0.001, 0.001);
    [UIView beginAnimations:nil context:nil];
    [UIView setAnimationDuration:0.3/1.5];
    [UIView setAnimationDelegate:self];
    [UIView setAnimationDidStopSelector:@selector(bounce1AnimationStopped)];
     self.transform = CGAffineTransformScale(CGAffineTransformIdentity, 1.1, 1.1);

    [UIView commitAnimations];
}

- (void)bounce1AnimationStopped {
    [UIView beginAnimations:nil context:nil];
    [UIView setAnimationDuration:0.3/2];
    [UIView setAnimationDelegate:self];
    [UIView setAnimationDidStopSelector:@selector(bounce2AnimationStopped)];
    self.transform = CGAffineTransformScale(CGAffineTransformIdentity, 0.9,0.9);
    [UIView commitAnimations];
}
- (void)bounce2AnimationStopped {
    [UIView beginAnimations:nil context:nil];
    [UIView setAnimationDuration:0.3/2];
    self.transform = CGAffineTransformIdentity;
    [UIView commitAnimations];

}

- (CGAffineTransform)transformForOrientation {
    UIInterfaceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation;
    if (orientation == UIInterfaceOrientationLandscapeLeft) {
        return CGAffineTransformMakeRotation(M_PI*1.5);
    } else if (orientation == UIInterfaceOrientationLandscapeRight) {
        return CGAffineTransformMakeRotation(M_PI/2);
    } else if (orientation == UIInterfaceOrientationPortraitUpsideDown) {
        return CGAffineTransformMakeRotation(-M_PI);
    } else {
        return CGAffineTransformIdentity;
    }
}

-(void)stopAnimatton{
    [UIView beginAnimations:nil context:nil];
    [UIView setAnimationDuration:1.0];
    [UIView setAnimationDelay:2.0];
    [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
    [UIView setAnimationDelegate:self];
    self.transform = CGAffineTransformMake(00.1, 00.1,0.001, 0.001, 0.001, 0.001);
    [UIView commitAnimations];
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM