objective c - iOS Global menu with photo and gallery buttons -


I told my down menu AppDelegate:

  - (minus) addBottomMenu {BottomMenu * Down Menu = [[Menu Elock Down] InitVithframe: CGRactMake (0, [ScreenHaller Whiteoffscreen] - 70, 320, 70)]; Down menu.laget = self; [[[UIApplication shared application] Rep] window] AddSaewviewview: Below the menu]; }   

I have 2 buttons in the menu to take photos from the gallery and take a picture for the camera. I want this button will do the navigating take will work globally (for each controller) it should work this gallery (or camera) and the user (or select) image on the same controller and image. The controller I would add these lines of code:

  - (minus) photoButtonTapped {UIImagePickerController * picker = [[UIImagePickerController alloc] init]; Picker.delegate = self; Picker.allowsEditing = Yes; Picker.sourceType = UIImagePickerControllerSourceTypeCamera; [Self present ViewController: animated picker: yes complete: zero]; } #pragma mark image picker representatives - imagePickerController (zero): (UIImagePickerController *) picker didFinishPickingMediaWithInfo: (NSDictionary *) info {imageOfReceipt = [information objectForKey: UIImagePickerControllerOriginalImage]; [Self shotgun viewer unpowered: yes complete: zero]; [Self display CJU videaffinator: @ "expansion reception" sender: self]; } - (void) imagePickerControllerDidCancel: (UIImagePickerController *) picker {[picker waste ViewControllerAnimated: Yes Full minus]; }   

... where the phototent is from the representative representative, it is working (when I was trying to down menu in the controller, not now when I added to the appetite). Problem in presenting the view controllers in AppDelegate (I know why, but I do not know how to do this left) I should work it in AppDelegate I do not want to duplicate it for each controller and want to change the representative in BottomMenu in AppDelegate. Is it possible to globalize?

Yes, it is. Callers Why not:

  [self.navigationController.topViewController presentViewController: Animated Picker: Yes Full minus];   

If there is no navigation controller property in AppDelegate, then try to present the view controller in the other way, for example try yourself. Windows. Rock view controller and you should probably prevent from using seguase.

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -