iphone - Passing variable to another view (using Utility template) -
okay, i'm newbie, need passing variable view. i'm using utility template in xcode. i think have linking (including proper header files , whatnot). don't know proper syntax. here's i'm trying: nsdate *time =[flipsideviewcontroller.datepicker date]; if run in rootviewcontroller.toggleview works fine. any would appreciated! there different ways pass 1 variable view as: 1) crate global variable in appdelegateclass: in appdelegate.h crate vriable nsstring *str property in appdelegate.m syntheses it. in view1 set variable as: yourappdelegate *appdelegate= [[uiapplication sharedapplication] delegate]; appdelegate.str= @"some string"; in view2 again crate same object , retrieve value. nsstring *mystr= appdelegate.str; the way define property in view2 , access view one.