Customized UIPickerView , iOS - button

I am trying to make a UIButton for the user where he will be able to choose between 5 different options. I have in mind something like an one line UIButton where one option will be preselected and when the user presses the button the 5 options would be displayed for the user to choose. In the objects library the closest i can find to that is the picker view , but its too big for my screen and it displays all the options , as i only want one to be displayed in the beginning and when the user hits the button all the options so that he can pick a different one if he likes. Is there a UIButton like this on Xcode that i am missing or should i customize a picker view or something?
Thank you in advance for reading my post :D

You can customize picker view like following
http://code4app.net/ios/Customized-Picker-View/4f72e7446803faa901000002
But I suggest that you use custom view which contains custom table view
and that view is shown as like picker view,means all properties like size,animation,position etc
all are in your control
If you want to customize table view like that
then follow the link
http://code4app.net/ios/3D-Tableview/4fc0da756803fae46f000000

Related

How do I limit the list of pages shown on a menu?

I've followed the example in the "Starter App". The menu shows all my pages. However, I only want certain pages to show. The example uses #pages._values as the data source, but I don't want all pages to show in the menu (some pages are only available under certain circumstances or are called from other pages).
How do I limit the menu datasource to the pages I want?
Following the "Starter App" template, first select the "Menu" PageFragment and then select the MenuListRow widget:
Then expand the Display properties and click on "visible". Next, click on "binding".
Now, we will use an array to determine what are the pages we want to limit. In this example, the array I'm using is ["Admin", "TestOne"] and we will use the indexOf method to match the page name that the label inside the list row widget contains. The value looks like this ["Admin", "TestOne"].indexOf(#widget.descendants.MenuItem.text) !== -1
Now just click "Ok" and then preview the app. The result is the following:
Please note that in the example I have 6 pages but only the two that are in the array are displayed. I hope this is helpful. If you need further clarification, please let me know.

How to customize default back button in UINavigationView ios7

I am using Navigation View Controller in storyboard to creates different views linked together by segue link. Therefore, all the back button are automatically created.
I have tried many ways to customize that back button with other text, or just no text but still cannot.
Here are the methods I tried,
self.navigationItem.backBarButtonItem.title = #"abc";
or
self.navigationController.navigationItem.backBarButtonItem.title = #"abc";
or
self.navigationItem.title = #"abc";
Please help me this one, thank you a lot :)
You can edit the back button's title in storyboards directly. Select the appropriate ViewController that's been imbedded in a NavigationController and then:

How can I add radio button and submit button in a drupal view?

I want to add radio button in my drupal view ?
I need to make a table of users and set for each of them one status(present,absent,delayed,...) by use of radio buttons, and A button under the table to save these statuses.
So how can I change view?
Mohsen,
Maybe Views Bulk Operations module can help you. You can download it at http://drupal.org/project/views_bulk_operations.
I used embed form module to add some radio buttons in my view. and now I must implement submission.
I wish I new.
I'm currently playing with hook_views_data to create a relationship within Views between my table and a node. This works ok.
I just need to work out how to make this data submittable from within the View.
If I work it out I'll let you know.

Qt:creating a dynamic button

I want to create an application in which i will create a button and by pressing that button as list of options will open and i can choose one of them.for example i will create a button named "searching algorithm" and by clicking this button a list will open at same place which display two options as linear search and binary search.can anyone give me an idea how to do that?
You want a QComboBox:
The QComboBox widget is a combined button and popup list.
I believe what you need is a popup window where you can have list of options, whenever your button is clicked show this window, hide it when user selects an item in the list or clicks outside of the working area. There is an example you can use as a reference:
QT 4.7 Google Suggest Example
hope this helps,
regards

DRUPAL: customize dropdown Views filter

I'm using Views dropdown filter (with tags) and it works great. However I would like to customize it in this way:
1 - remove button "Apply" and automatically update Views (at the moment I'm updating it with Ajax)
2- allow my customer to change the order of the dropdown items (specifying top items)
3- select multiple items without having to press the SHIFT button on keyboard (do not unselect other items if new items are selected)
http://dl.dropbox.com/u/72686/viewsFilter1.png
Let's suppose the items in the image are tags... something like this:
http://dl.dropbox.com/u/72686/viewsFilter2.png
thanks
Use jQuery to .hide() the Apply button, and then set a handler on the filter fields so that whenever one of them is changed (i.e., by the user), the Apply button registers a click.
Hmm, can't help with this one. You might be stuck writing a custom module that hooks into the Views API.
Sounds like the Sexy Exposed module would solve this problem?
I'm using the following code to keep the items selected and it works.
$('#edit-tid option').click(function() {
$(this).toggleClass("selected");
$("option:not(.selected)").removeAttr("selected");
$("option.selected").attr("selected", "selected");
//submit request
$('#edit-submit-Portfolio').click();
});
When a request is submitted the page is refreshed. The selected items are still selected (class="selected") but the javascript code do not keep them selected.. I don't understand why, since they have the correct class attribute.
So.. it doesn't work after refresh, even if the html code is the same (the same class="selected" attribute is assigned to the same items).
thanks
I've solved point 1 and 2, installing better exposed filter module from drupal website.

Resources