Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

ios - UINavigationController Drill Down with Table View -


i have uitableview lists contents of document directory. have zip files in that. if touch file in uitableview, corresponding zip file unzipped , extracted in temporary directory (nstemporarydirectory()).

the problem how navigate contents extracted in tableview. if suppose, extracted zip file contains folders, should able view them in tableview. flow should drill-down.

i able extract zip files, problem is, have navigate them in uitableview.

this didselectrowatindexpath: part:

nsstring *filepath = //filepath; if ([[nsfilemanager defaultmanager]fileexistsatpath:filepath]) {     nslog(@"file exists @ path: %@",filepath);          } else {                 nslog(@"file not exists @ path: %@", filepath);        }                 nsstring *tmpdir =nstemporarydirectory();        ziparchive *zip = [[ziparchive alloc] init]; bool result = no;  if ([zip unzipopenfile:filepath]) {     //zip file there     if ([zip unzipfileto:tmpdir overwrite:yes]) {         //unzipped         nslog(@"archive unzip success");         result= yes;     } else {         nslog(@"failure extract archive, maybe password?");     }    } else  {     nslog(@"failure open archive"); }         if ([[nsfilemanager defaultmanager] fileexistsatpath:tmpdir isdirectory:&isdir] && isdir) {     nslog(@"its folder");     //prepare tableview.                  rootviewcontroller *rvcontroller =[[rootviewcontroller alloc]initwithnibname:@"rootviewcontroller"bundle:[nsbundle mainbundle]];     [self.navigationcontroller pushviewcontroller:rvcontroller animated:yes]; } 

but not working. it's pushing same contents in document directory in tableview.

you need use uinavigationcontroller handle drill down. each drill down new uitableviewcontroller.

you need second uitableviewcontroller subclass handle displaying files contained in zip. have nsstring property full path zip folder. uses list of files in directory data source.

add original tableview (controller) uinavigationcontroller's rootview @ startup. when tap tableview lists zip files, push onto uinavigationcontroller second uitableviewcontroller reference extracted files (a new folder?).

[uinavigationwcontroller pushviewcontroller:nexttableview animated:yes]; 

see legacy code example apple drilling down in uinavigationcontroller. also, check out the docs on uinavigationcontroller apple.


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -