- Get link
- X
- Other Apps
i got little program button when user presses want open view, button "add note" want new view slides bottom top user can add info , accept it, same way can in address book add new contact. got here class called notecontroller , function open other view linked it:
here code
notecontroller.h
notecontroller.mcode:#import <foundation/foundation.h> @interface notecontroller : uiviewcontroller { iboutlet uitableview * tableview; iboutlet uiview * openview; } -(ibaction)openaddnoteform:(id)sender; @end
sorry noob, couldn't google don't know exact words.code:#import "notecontroller.h" @implementation notecontroller -(ibaction)openaddnoteform:(id)sender { // // notecontroller.m // muistio // // created samuli lehtonen on 28.5.2010. // copyright 2010 test. rights reserved. // #import "notecontroller.h" @implementation notecontroller -(ibaction)openaddnoteform:(id)sender { [openview setframe:cgrectmake(0, 480, 320, 480)]; [openview setbounds:cgrectmake(0, 0, 320, 480)]; [uiview beginanimations:nil context:null]; [uiview setanimationduration:1.0]; [uiview setanimationdelegate:self]; [openview setframe:cgrectmake(0, 0, 320, 480)]; [uiview commitanimations]; } @end }
how trying use sdk-friendly solution
moi. first, based on description above, suppose instead of customizing , displaying customized view yourself, using more sdk-friendly solution might recommended in case. declare view controller (ex, myviewcontroller) in notecontroller property, , implement necessary methods in myviewcontroller handle user input , stuff that. here's sample code snippet might need:
then, in implementation file of "myviewcontroller", there should button bring user previous view (notecontroller.view) when user finished input, implement this:code:-(ibaction)openaddnoteform:(id)sender { [self presentmodalviewcontroller:myviewcontroller animated:yes]; }
i'm not sure if you're looking for, anyway, luck.code:-(ibaction)handleuserinputended{ //before return previous view, should implement codes handle saving user input , stuff that, then: [self dismissmodalviewcontrolleranimated:yes]; }
Forums iPhone, iPad, and iPod Touch iOS Programming
- iPhone
- Mac OS & System Software
- iPad
- Apple Watch
- Notebooks
- iTunes
- Apple ID
- iCloud
- Desktop Computers
- Apple Music
- Professional Applications
- iPod
- iWork
- Apple TV
- iLife
- Wireless
- Get link
- X
- Other Apps
Comments
Post a Comment