iOS 4 - How to add table view to a tab bar application - iphone

I am new to iPhone programming and am having a really hard time trying to figure out how to add a table view to a tab bar application. There are not many tutorials on this for iOS SDK 4 and the Apple documentation is very light on details. Since I am new I would really like some tutorial that has screenshots (or at least clear instructions) when it comes to things being done in Interface Builder (like making connections between the objects and File Owner, etc), usually lot of tutorials/blogs gloss out these details.
What I am trying to do is create a tab bar based application with 3 tabs (this I am able to do). The first tab needs to display a table view with the header having 2 buttons (one on right and other on left, with the title in middle).The title is actually today's date, obtained from the phone. Clicking either of the header buttons should take you to another table and the title should be yesterday's date (if left button is clicked) and tomorrow's date if right button is clicked.
Can some one please suggest me a good tutorial for this. I am thoroughly confused by the Interface Builder (especially how to create connections).

The only page I remember frequenting on the past, is CocoaDevCentral.
Personally, I learnt how to use Xcode through video tutorials, so I recommend you to start searching there. Also, to help you with your search, always look for the full name of the objects involved, for example: instead of searching for "tableView", look for "UITableView", apple's notation is very particular and helps narrowing down the result.
Finally, ignore the nay-sayers about Interface Builder, you should give it a try, and see if it fits your style. For instance, I like being able to get a look at the overall design, as I usually help with the design.

Related

How can you add iOS buttons and features to a Table View based app?

So basically I have made a storyboard based app which consists of table views and text. It is designed to help new programmers like a handbook. You have a table view which allows you to choose a language, a table view which allows you to choose a section (eg initialisation) a table view to choose a subject (e.g. integer) then a text view of how to go about this.
When it was reviewed, they said
Did not include iOS features. For example, your app was just largely
text table views. It would be appropriate to use native iOS buttons
and iOS features other than just web views, Push Notifications, or
sharing.
I feel like adding these things would degrade from the simplicity and educational purpose of the app. Also, I feel it might be more difficult to navigate if its all iOS button based. Also it might be more difficult to add things later.
So how would you go about adding these things to a table based app so that it can pass the review? I just don't know what they want me to add/change. I have just added a title page with a background image and iOS buttons that direct to the main section a small section and the contact us page. What else can I do?
how would you go about adding these things to a table based app
I'd start by trying to forget about what I'd already done (since that was rejected) and ask myself: how can I design this using the tools available so that the user can quickly get to the information they need?
UIPickerView comes to mind. Instead of going through three screens just to say what you want, a picker with three sections would let you select all three parameters at once.
It'd be nice if you could provide access to the information in the app several ways. What if I want to browse through all the topics? Do I have to choose one section at a to,e, or can I just start reading? A search feature would be nice, so I can find stuff even when I don't know what section it's in. A tab bar and search field would be useful for these.
Perhaps the most important thing is that however it's designed, your app should look polished. It should look like you spent time making it useful and beautiful. Give it some personality.

Flip from one ViewController to another iBooks Style

I'm trying to load in content from a database and allow the user to flip through it like pages, then at the end of the content, give them options to go to another section of content (probably with buttons). The content is currently just formatted with html, but how do I implement the buttons to navigate? I'm a little new to Xcode so maybe I'm not even looking in the right direction.
refer a this opensource: https://github.com/devindoty/iBooks-Flip-Animation
this is very little code and perfectly works.

Alternatives for picker in iphone/iOS app?

I am showing a form the user fills in my iPhone app. One of the fields is a set of 2 or 3 dates from which the user has to pick one. Putting a picker, or bringing up a table view just for this takes up too much space, leaving no room for the other fields. Is there any simpler way to do this?
To do this you can put two or three arrowed label with text like "Select Date" upon click of it you can show one view that allow user to select the date; once selected you can back to the original view. You can do this for all three (or two) dates and get those date on form view.
I am giving you idea of how you can design apps; if you want code i can assist that too but from your question it seems you want design ideas.
You can go for your custom drop down/combo box, but their is no inbuilt functionality present for this.
Also following is mentioned in apple HIG guideline, you need to consider those as well-
(http://developer.apple.com/library/IOs/#documentation/UserExperience/Conceptual/MobileHIG/UIElementGuidelines/UIElementGuidelines.html)
Guidelines
Use a picker to make it easy for people to choose from a set of values. It’s often best to use a picker when people are familiar with the entire set of values. This is because many, if not most, of the values are hidden when the wheel is stationary. If you need to provide a large set of choices that aren’t well known to your users, a picker might not be the appropriate control.
Consider using a table view, instead of a picker, if you need to display a very large number of values. This is because the greater height of a table view makes scrolling faster.
Use the translucent selection bar to display contextual information, such as a unit of measurement. Do not display such labels above the picker or on the wheel itself.
On iPad, present a picker only within a popover. A picker is not suitable for the main screen.

Two UITableViewControllers and One UISearchDisplay

I'm new to iPhone programming and is faced with a task to show data on of Books where the first table view shows the books in my library using the title of the book to sort and another table view to show the authors. There is a need to have a search bar on both of the table views and when used to search will show results categorized as certain results is returned according to the author and the others returned according to the title. Something similar to the search results returned by the iPod App.
Thanks in advance to all who can shed light.
From what I gather, it sounds like you need to organize this somehow. I recommend you try a tabbed-based application. Create three tabs with the first two having navigation controllers for your tables. The first tab will have the tableView that sorts by book title. The second tab will have the tableView that sorts by the author. The third tab can do the search for either case. Hopefully, that points you in the right direction.

How do I create a dictionary-style scroll bar for iPhone (like in the Contacts list)?

I am creating an iPhone app which I would like to have a similar interface to the iPhone's native contact picker view, i.e. an alphabetical list which you can scroll through, with a search bar up top which narrows down the list. Particularly, I'd like to be able to show the letters of the alphabet down the side so that as you scroll through the list, you see your position in the alphabet in the scrollbar. The problem is that my data basically consists of key-value pairs, not contact data, so I can't easily use the native contact picker.
As far as I can see, I have two options to achieve what I want:
Use the ABPeoplePickerNavigationController class and hack it to use an address book which I fill myself with non-address type data. The problem with this is that, by default, the address book will fill up with the contacts from the iPhone so that each time the app opened, I'd have to flush those contacts and build my own list. (Not to mention other problems associated with using an interface which is bound to a particular data structure)
Use a UISearchBar and UIScrollView. This would be fine, but I'm not sure how to do anything to the scroll bar except change its colour - I can't see how to override its contents.
Any advice on which is the simplest way? What are the pitfalls (particularly of 1)?
To get the letters down the side, you can just provide a -sectionIndexTitlesForTableView: method in your table view datasource. As for searching, there's a bit more work there, and it's very dependent on your data. A UISearchBar is the place to start, however.
For a search bar, have a look at TTSearchBar in the Three20 library.
Everything else can be easily implemented using UITableView.