English 中文(简体)
• 如何在UIPicker文中添加“导航Bar”和“纽顿”的“i program”字。
原标题:How to add NavigationBar and button in UIPickerView of iPhone Programming?

I would like to ask a question. Now i m training about iPhone Programming. I m just new baby in iOS Programming. I want to add navigationbar in UIPickerView s upper place. It s like the UINavigationBar in MainView. I just want to add on UIPickerView. and also i want to add Done button in that NavigationBar. After i touched that done button, my view will back to main view. How can i do that? Please answer me if you know. I hope you understand my question. Sorry for my bad english. Thanks you for reading.

最佳回答

你们都把一条航道拖到cker顶上。 假设你想要这个UIPicker人到场,那么,这只是为 pick客、在航道上rag和cker客形成一种看法,然后调整你对酒吧和ui客的看法之窗。 TH你刚刚需要 h弄酒吧和ui客,把 owner主当作代表。 是否有意义?

问题回答

When I understand you correct, you have one navigation controller and want to add to this navigation controller a new UIView with a UIPickerView which comes up after pushing the edit Button and hide when you press done button?

Then I would create a new UIViewController in Interface Builder, add the UIPickerView to this View. Put this in the correct place. In the new view controller add a property of type UIPickerView and connect the IBOutlet of PickerView to the FilesOwners Property. In the Controllers method viewDidLoad you set then for example:

[self.datePicker setHidden: YES];
self.navigationItem.rightBarButtonItem = self.editButtonItem;

这一纽伦语自动使用确定的方法:推动。 例如,你可以执行:

- (void)setEditing:(BOOL)editing animated:(BOOL)animated {

[super setEditing:editing animated:animated];

if (editing) {       
    [self.datePicker setHidden:NO];
} else {
    [self.datePicker setHidden:YES];
}

}





相关问题
List Contents of Directory in a UITableView

I am trying to list the contents of Ringtones directory in a TableView, however, I am only getting the last file in the directory in ALL cells, instead of file per cell. This is my code: - (...

iPhone NSUserDefaults persistance difficulty

In my app i have a bunch of data i store in the NSUserdefaults. This information consists of an NSObject (Object1) with NSStrings and NSNumbers and also 2 instances of yet another object (Object2). ...

Writing a masked image to disk as a PNG file

Basically I m downloading images off of a webserver and then caching them to the disk, but before I do so I want to mask them. I m using the masking code everyone seems to point at which can be found ...

Resize UIImage with aspect ratio?

I m using this code to resize an image on the iPhone: CGRect screenRect = CGRectMake(0, 0, 320.0, 480.0); UIGraphicsBeginImageContext(screenRect.size); [value drawInRect:screenRect blendMode:...

Allowing interaction with a UIView under another UIView

Is there a simple way of allowing interaction with a button in a UIView that lies under another UIView - where there are no actual objects from the top UIView on top of the button? For instance, ...

热门标签