public override bool FinishedLaunching(UIApplication app, NSDictionary options) { window = new UIWindow(UIScreen.MainScreen.Bounds); InitListOfImages(); var root = new RootElement("SDWebImage Sample") { new Section() }; int count = 0; foreach (var item in objects) { count++; string url = item; var imgElement = new ImageLoaderStringElement( caption: string.Format("Image #{0}", count), tapped: () => { HandleTapped(url); }, imageUrl: new NSUrl(url), placeholder: UIImage.FromBundle("placeholder") ); root[0].Add(imgElement); } dvcController = new DialogViewController(UITableViewStyle.Plain, root); dvcController.NavigationItem.RightBarButtonItem = new UIBarButtonItem("Clear Cache", UIBarButtonItemStyle.Plain, ClearCache); navController = new UINavigationController(dvcController); window.RootViewController = navController; window.MakeKeyAndVisible(); return(true); }
public override bool FinishedLaunching (UIApplication app, NSDictionary options) { window = new UIWindow (UIScreen.MainScreen.Bounds); InitListOfImages (); var root = new RootElement ("SDWebImage Sample") { new Section () }; int count = 0; foreach (var item in objects) { count++; string url = item; var imgElement = new ImageLoaderStringElement ( caption: string.Format ("Image #{0}", count), tapped: () => { HandleTapped (url); }, imageUrl: new NSUrl (url), placeholder: UIImage.FromBundle ("placeholder") ); root[0].Add (imgElement); } dvcController = new DialogViewController (UITableViewStyle.Plain, root); dvcController.NavigationItem.RightBarButtonItem = new UIBarButtonItem ("Clear Cache", UIBarButtonItemStyle.Plain, ClearCache); navController = new UINavigationController (dvcController); window.RootViewController = navController; window.MakeKeyAndVisible (); return true; }