uipickerview

Is it possible it get a .xib window to a tabbed storyboard

与世无争的帅哥 提交于 2020-01-04 09:25:30
问题 i have not long bin doing code, Xcode so I'm a little rubbish basically i have created a .xib and would like it to be in a storyboard but i really don't have a glue where to start because i have a xib window that has UITableView and UIPickerView in it and all the code is fine in the xib but do i need to add code in the storyboard .h / .m etc and is it possible if not how can i do some kind of drop down menu for my app. Heres the code in the xib #import <UIKit/UIKit.h> @interface myview :

UIPickerView and UITextField get value from UIPickerView

寵の児 提交于 2020-01-03 04:54:46
问题 Ok I am having trouble figuring out how to approach this. I have a UITextField which I add to a UITableView dynamically according to the definitions of a XML file, in the XML file I may specify a list as one of the data types and what I do then is add a UIPickerView that displays the list to the inputView of my specific UITextField. What I am having trouble with is figuring out how to take the selected value from the UIPickerView and add it to the text property of my UITextField My

Populating UIPickerView with Core Data objects using Swift

拥有回忆 提交于 2020-01-02 11:05:13
问题 I am trying to populate an UIPickerView with Core Data objects in a Swift app. For now, I am getting a picker view with 4 rows (there are 4 objects in the Core Data entity). My issue is that all 4 row titles are from the same object. Please take a look at a screenshot: And this is my current piece of code: override func viewWillAppear(animated: Bool) { getFetchedResultController_cat(currentEntity_cat) } func getFetchedResultController_cat(selectedEntity: NSString){ let appDelegate :

iOS 8 broke UIPickerView in UIActionSheet

烂漫一生 提交于 2020-01-01 12:11:04
问题 I was presenting a picker in UIActionSheet very simply up until iOS 8. Now, it seems they have broken that capability with the latest update. It was never supported and the practice was discouraged in the docs all along. Presumably the entire UIActionSheet capability is deprecated and will not be supported going forward. The documentation says to use UIAlertController instead. I have tried switching to the UIAlertController and actually found what I initially expected would be a nicer

programmatically stop uipickerview animation on iphone

有些话、适合烂在心里 提交于 2020-01-01 09:24:20
问题 I have a UIActionSheet containing a picker and a UIToolbar. On the UIToolBar there is a save button. However, some of my users reported pressing the save button before the UIPickerView stops spinning thus only retrieving the initial value (before spinning). Is there a way to get the currently selected item of the UIPickerView once the user taps save or get feedback of the active selected item while it's spinning? Thanks 回答1: Even if they dismiss the picker while it's still spinning, the

How do I get a list of countries in Swift ios?

余生颓废 提交于 2020-01-01 03:59:05
问题 I've already seen two similar questions to mine, but the answers for those questions do not work for me. I have an old project with a list of countries manually typed out inside a set of square brackets. I can easily use this in my pickerView but I'm wondering if there is a more efficient way to do this? I will be using the list of countries in a UIPickerView. 回答1: You can get a list of countries using the NSLocale class's isoCountryCodes which returns an array of [String] . From there, you

An iphone uipickerview that rotates horizontally?

十年热恋 提交于 2019-12-31 10:46:33
问题 I've only seen it in a VERY few iPhone apps... but it looks like a picker that rotates left/right (instead of top/bottom). They usually put it on 1 line of a tableView... to allow the user to quickly pick between a small number of choices (like 3-10). How is that coded? 回答1: Continuing the answer by Dave DeLong I got it working like this...... In viewDidLoad i did this... CGRect frame = horizontalPickerView.frame; frame.size.width = 50; frame.size.height = 216; frame.origin.x=90; frame.origin

How to manage data between the entities with the UIPICKERVIEW?

会有一股神秘感。 提交于 2019-12-30 14:17:55
问题 I have a scenario in my basic inventory app. i fetched the records from the core data entity and want other records to be entered against that one. I have two core data entities Category and Product i have made their relationship as well. i have done with the category part. now i want to add Products against the selected category. for that i am using a UIPICKERVIEW to show the category name. I am currently showing the names to the UIPICKERVIEW When the user select the name and enter records

How to manage data between the entities with the UIPICKERVIEW?

纵饮孤独 提交于 2019-12-30 14:17:08
问题 I have a scenario in my basic inventory app. i fetched the records from the core data entity and want other records to be entered against that one. I have two core data entities Category and Product i have made their relationship as well. i have done with the category part. now i want to add Products against the selected category. for that i am using a UIPICKERVIEW to show the category name. I am currently showing the names to the UIPICKERVIEW When the user select the name and enter records

how to change the background color in UIPickerView?

你。 提交于 2019-12-30 11:27:10
问题 I want to change the background color in UIPickerView , Is it possible? 回答1: UPDATE: One simple trick is to set the alpha on some of the subviews. Which one specifically depends on how many components you have, but the code is: [(UIView*)[[picker subviews] objectAtIndex:2] setAlpha:0.5f]; This will make the dial semi transparent and show through the background colour. Setting the backgroudColor doesn't appear to do anything. The best I have been able to do so far is set the background colour