creating a custom control in iphone - iphone

I have made a custom control in my application. It is like a combo box. when a button is clicked a table view will appear. user selects a row from that table and the value will be displayed on either textfield or on the button's lable. Now i wanted to know, if it is okay if i make a custom control like this in iphone. Or will it be rejected when i submit it to app store??? i feel like i am taking a risk here???

This is perfectly ok, and in most cases, encouraged.
The only argument against it would be that it might have been easier and less work to just use a normal button and a UIPickerView, but that is entirely subjective and completely up to you.

Related

iOS - UIPickerView Dismiss with button or without a button?

Good Afternoon/Evening/Morning Folks,
I recently encountered a discussion with another developer on dismissing a UIPickerView. We work on a legacy enterprise application that had a lot of issues and was written very poorly (among other things). Since then, we revamped and fixed a lot of bugs with this program, strictly adhering to Apple's Human Interface Guidelines as much as possible while keeping to original requirements.
We seem to have a difference in opinion as Human Interface Guidelines do not really go into any detail about picker views. We implemented our new UIPickerView with a "Done," Button to confirm a selected value to be placed in a UITextField. Screen's input would be locked until they selected a value or clicked done.
Legacy application prior to our changes allowed users to utilize a done button but also by way of tapping a value selected in a picker. In addition, legacy application would also show selected UIPickerView value in UITextField prior to selection, wiping out original contents , if any was selected prior to opening a UIPickerView.
So, What is correct way to implement a UIPickerView per common practice or Strict Apple Documentation (if any exists). What is common practice?
Sorry, I cannot post any screen shots or code snippets due to business process reasons. I will do my best to explain if any questions arise.
Thanks,
We can figure this out through apps designed by Apple. Here are two examples
1. Contacts
Find a contact person in the Contacts app and set birthday. The picker shows up. While you are dragging the pickers, it does not set value to the text field. It happens only when you release the wheel. There is no Done button to hide the picker it self. To dismiss it, you can either click on the done button on navigation bar to end editing for the whole page, or click on another text field which pops a different keyboard.
2.Setting - Date&Time
Basically the same as Contacts app. Here you cannot even dismiss the picker.

draw button as combobox with ios

I'm attempting to override the onDraw method of a button because I want to create a different styled button. I want to create a button like combobox with iOS SDK. I've already found source code, but it will not work.
Try this for combo box in ios.
IosCombo
Depending on how many entries you're trying to choose from, you might want to look at UISegmentedControl. It's like a radial button, where you can select one "active" option (leaving one or more "inactive" options). It gets cluttered and it becomes hard for the user to select the option they want if you have a lot of different options though.

How would I go about detecting links in TTTAttributedLabel?

I have a table view and in some of the cells there are links, I want to be allow the user to click on these links and view them in a webView (which I have already made). I don't want to use the row selection event because there may be more than one link in the cell. I came across TTTAttributedLabel and think it will be ideal. I don't need to add any style to the text in the cell, I only need to detect the links and capture the click event to open up my webview.
Any help would be greatly appreciated.
It looks like you can assign a TTTAttributedLabelDelegate to a TTTAttributedLabel that will get call backs for when a user selects different link types, but no opportunity for you to capture them and open your own web view (which I think is what you're trying to accomplish).
Instead, you might wanna check out OHAttributedLabel. It's similar in functionality, but when a user clicks on one of the links in the label, it calls -(BOOL)attributedLabel:(OHAttributedLabel*)attributedLabel shouldFollowLink:(NSTextCheckingResult*)linkInfo on it's OHAttributedLabelDelegate, which gives you the opportunity to handle the link tap yourself if you return NO.

iPhone Table View Data Edit Pane

I have an application I'm working on, and I need the user to be able to add new "Shows", "Movements" and "Dots." These are all represented by classes. At the root of the application, all the shows are shown, the user can click on the show, see the movement in that show, then tap on a movement and see the dots in the movement. It works beautifully.
Now, I need the user to be able to add and edit these instances of these classes. The way I am thinking this will work is when the user clicks on the "Add Show" button (Or the "Add Movement", etc) a new view will be pushed onto the Navigation Controller. This works. When the button is pressed, a new instance of the show class is created, and passed to the new view controller. This also works. If the user wants to edit the show, then they will hit the edit button for the row, and the instance of the class (which already exists) will be passed to new view controller, and the user will be able to edit it (It should use the same view controller for adding and editing)
My question is, in the examples I have seen, it is always really dirty to create the editing view. The edit view is a table view with each row having some sort of control. Usually it is a UITextField, but it may be a slider, and it may be one where another view is popped, and the user needs to check one value. (This is similar to the address book application when adding and editing a contact)
Is there any way that is cleaner than just manually going in and creating a bunch of arrays to hold what custom table view cells need to be at what row? This gets very messy, very fast. I can do it this way, I just was wondering if there is a better, possibly faster way.
To my knowledge there's no structural solution to solve this. I'm afraid managing the cells with child UITextField or other controls yourself is the only method. This indeed gets dirty and painful very fast, I certainly feel your pain.
Although it doesn't exist, it would be very convenient if Apple added out of the box editing cells to the SDK, similar to the different normal cell styles. I haven't come across an open source project that addresses this issue, but it might exist.
If you do find a better/cleaner method to handle these situations, be sure to ping back.
as far as i know, editing mode is the only way to make the changes you describe (if i understood correctly). I agree that it doesn't seem like the most elegant approach.
http://developer.apple.com/iphone/library/documentation/UserExperience/Conceptual/TableView_iPhone/ManageInsertDeleteRow/ManageInsertDeleteRow.html#//apple_ref/doc/uid/TP40007451-CH10-SW19

UIToolBar - How to Handle Button-Overflow?

I have a view with a toolbar - each button on the toolbar represents a new message the user is composing. It took me several work days to figure out how to handle the view switching, etc.. but now that I have that all figured out, I have run into a bit of a UI-snafu.
When I have over 11 buttons (I know, a user should really SEND the first 10 before creating an 11th, but I am trying to be thorough) the buttons run off the end of the screen. There is no indicator (aside from the half-button you can see), that there are additional button(s) that can be pressed.
Has anyone run into a situation like this before, and how have you handled it?
My initial thought is when there are more than (lets say) 8 buttons, I programmatically make the first and last buttons "<" and ">" buttons that will slide the buttons down, by removing and adding buttons to my [toolbar items].
Any thoughts?
Instead of creating a new type of UI for the iPhone (which Apple may or may not accept) it would probably be best if you just told the user that he/she has reached the limit and will have to send a message before they can create a new one. Like Safari does when you try to open a 10th webpage.
I think Kane is probably correct, but what you're trying to do sounds a lot like a scrollable tab bar. Three20 offers a class that handles this, or you could implement it yourself. There's no provision for this in the OS (I think the UI guys would probably strongly object if you said you were trying to put 10 buttons down there, let alone MORE than 10.)