Iphone Toolbar Icon with Dynamic Count - iphone

I've done a lot of googling and am at the end of my rope so here goes ... I just need to know if this is possible so I can design a series of screens for an Iphone app.
In my app you are able to leave comments on a certain topic, I would like an icon in the toolbar that displays a word bubble with a plus sign in the center when there are no existing comments and if there are existing comments I would like to display the same word bubble but instead of the plus I want to show the number of existing notes programatically.
Is this possible?
thank you

Yes, it's possible. You populate a toolbar with UIBarButtonItem instances. You can create one of these using
-(id) initWithCustomView:(UIView *)myCustomView;
In your custom view, you can put any graphics you want, including a plus sign, or a subview with a UILabel that shows the number of comments.
When the status changes (comments are added or removed), you just need to create a new UIView and set the toolbar.customView to that view.

Related

How to create an expandable and collapsable menu WITHOUT a tableviewcontroller

I have a question. I am trying to create an expandable FAQ menu without using a tableviewcontroller. The reason I don't want to use a tableview is because I don't want expandable cells, rather, I want a buttonclick to reveal a label while also sliding down any other buttons on this page.
I'm using Swift in Xcode 7.3
If anyone has any suggestions/knows of a tutorial/a forum post, it would be greatly appreciated.
Thank You.
Sure,nyou could use buttons, and either change constraints on label heights or dynamically add labels. That's a lot of effort and code.
Or, you could use a table view and one of the myriad guides. Remember that table views don't have to be selectable on ever row, and they don't have to display row separator lines (UI).
Indeed you could disable selection on all rows and add buttons to some rows, though I'd personally say that's overkill and why require the user to be 100% accurate with the tap on a button which in your sample image doesn't even look like a button.

iOS: Search Options UI

I am building an iPhone app for a library and I want to give few options to the user to search books by. A user can search a book by title, author, topics, or date of publication.
What I want to know what's the best way to display these search options to the user? In terms of HTML, it would be easy - either use a drop down list or radio buttons. I tried using UIPickerView but honestly, that looks terribly ugly and destroys the aesthetics of the view of my app.
The other option I was thnking was using segmented control, but is it possible to have a vertical segment control in stead of horizontal one? The selection texts can be too long.
Any ideas?
If you want a vertical segmented control, you'll have to make it yourself. Create a textured image with dividers. I would export each section as a PNG separately. Then create a picture of each section with the "pressed down" gradient and export each segment as a separate PNG again.
I would then make a new class. If there is a specific number of objects in your segmented control or this is a one time thing, the class may not even be necessary. If not, then in the class constructor pass an array with the titles of the segments in your segmented control. For the first and last objects, use the pictures you made with rounded corners. For the objects in between, use the standard pictures. Then put the titles on top. When a segment is tapped (perhaps use hidden UIButtons), you can use a delegate method to tell the main search class which one was tapped, and then the class can replace the normal picture of that segment with the pressed down one.
Thanks for the options.
I ended up creating a simple table to show my choices.
User clicks on "search by", which opens up the table with options and then when you select any option, you return back to main view with the chosen search option.

What UI elements (objects) are used in livingsocial iPhone app?

I am new to iPhone development. I am using Titanium for developing but I guess that hardly concerns my question.
What UI elements where used to develop the certain pages of livingsocial? There are hardly 5-6 windows in the whole app.
a) For eg: if you see the main page(daily deals,escapes,purchases,settings) - did they use a window with a black background image & then added tableview to it for the four options? each tableviewrow has different images. Is that how it could be done?
Also if you notice the four options are scrollable but the heading livingsocial stays static & looks different from the native UI. How was that done?
b) If you look at sign in page (in settings) - they have two textfields & a sign in button inside a window. For the last element (Don't have an account?), is that again a tableview inside a scrollableview?
It would be great if someone can give a general outline as to how they developed their app & what UI objects we used.
edit: please find the screen shots :
a)http://dl.dropbox.com/u/9556373/IMG_0616.PNG b)http://dl.dropbox.com/u/9556373/IMG_0620.PNG
a) For eg: if you see the main page(daily deals,escapes,purchases,settings) - did they use a window with a black background image & then added tableview to it for the four options? each tableviewrow has different images. Is that how it could be done?
Also if you notice the four options are scrollable but the heading livingsocial stays static & looks different from the native UI. How was that done?
That app uses a custom made UINavigationController (for the static bar at the top, that can accommodate the title of the view and different buttons depending on the view currently showing, namely a back button for returning to the main view) and UITableView with custom made cells.
b) If you look at sign in page (in settings) - they have two textfields & a sign in button inside a window. For the last element (Don't have an account?), is that again a tableview inside a scrollableview?
No, I think that's a UIButton, that just happens to look like an isolated cell. Also, that view doesn't look like its scrollable.
I'm not familiarized with Titanium, so I can't give you any directions there. But keep in mind that using custom controls usually takes more effort than simply using apple's own default.
In answer to your first question:
I'd use a tableview for that, with custom made cells to create that look. If it is not a main window on your tab you'll have to remove the 'back' button, otherwise it'll be fine.
In answer to your second question
The first 2 are textfields. The rest are all buttons (and the text above facebook button is a label).
If you're using titanium you could take a look at the kitchensink example.
Hope this helps!
Tjellekes

iPhone panel control

In my iPad application there are many buttons (around 50), and I want to make a group box which contain buttons arranged by category.
I am looking for something like a C# or .NET GroupBox/Panel.
There is no Group Box / Panel Box in iPhone.
You need to manage by your self.
Use the UITableView to put all the button in on category.
http://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UITableView_Class/Reference/Reference.html
It may be worthwhile to look into UIPopoverController views. These are the little popup views that appear when you click stuff. YOu could easily break your menu system into smaller parts with these.
You may draw a group panel by making two views. make a view of frame say 20,20,280,199 and then another one with frame 21,21,278,197. now put the 2nd view on the last one and change the color of last to some dark than later one. enjoy :)
remember that the should be in same hierarchy. that no one should be parent or child of any of these.

iPhone custom UITableViewCell accessory graphic, a HIG violation?

I want to introduce a custom pencil accessory image in a tabel cell and in the standard accessory righthand UITableViewCell position. The pencil image will be used to indicate that the text in the table cell can be edited via a popup modal full screen view.
Will Apple penalize this innovation during the app review process?
My justification is that the standard disclosure indicators do not convey the right meaning. According to the Apple HIG doc the ">" disclosure should present another more detailed list view and the the blue "+" disclosure button should reveal extra details about the selected table row.
I feel that opening a text edit view falls between the ">" and "+" usage, hence my pencil image idea.
Edit: Just to complete the picture, the table view has two fat rows. The upper row poses a multiline question and the lower row shows a text answer.
I don't think that Apple would penalize you for creating a custom button/icon. This is not something to concern. The problem here is to make you user understand what is the function of you custom icon, since they are used with the standard iPhone UI.
I my opinion for the functionality that you want to put on your icon, it would be better if you use the custom UI for editing table cell, that is presented on this image that I could find Googling (http://adeem.me/blog/wp-content/uploads/2009/UITableView/AddDeleteReorderUITableView/Picture%202.png).
So, people are used to edit the content of table cells by using the edit button and after pick the current cell...than you can show the modal view, so the user can edit the content.
To have a better picture, compare your table cell with, for example, the Clock app.
Try to avoid custom controls as much as you can. if something exists on the standard UI, go for it it is easy for people to look and understand.
Imagine that in your browser the load icon, instead of this circular arrow, it was changed by "L" in the latest update, would be something tricky to us to understand a non-standard symbol.
Think about it and chose the most appropriated approach for your purpose.
Cheers,
VFN