I’m new to the world of iOS development.
I’m creating a iPad application where I need to have three dropdown (I know there is not dropdown on iOS, i'm doing a analogy with html).
The user selects the value from the first dropdown and the second will be loaded with respective values (from an external source). Then user selects one value from the second dropdown and the other dropdown will load values so the user can choose.
My question, if this was a web application I would use 3 dropdown Ajax, but on iPad applications there is no dropdown. What is the best controller to do this on a iPad application?
You have to use UITableview for that...you can take three table view or take only one tableview and set frame according to your requirement dynamically...then once you select any row from 1st table..using that value please fetch value for another table (for another drop down value list)....All The best!!
iOS typically uses a combination of navigation controllers and table view controllers for this. When the user selects an item in the table the entire things scrolls off the screen to reveal the next table ('menu').
You see this all the time in iPhone apps and in the master view of split view controllers on the iPad.
I'd recommend that you buy a book such as 'iPhone 4 development' to get you started. There are many great books available.
Tim
Related
I have an app that uses an SQLite database for user choices of backgrounds, icons, fonts, etc. I didn't create it, so, I have to use what I have, as, I have a rather large installed base, and am not inclined to switch to CoreData at this point. Don't want to piss off the current users. I also am not really up to speed on SQLite or CoreData.
I was using a custom grid view to display the backgrounds and icons. All of that has been changed to UICollectionView with a UICollectionViewCell.
In the SQL file, the base set is one table of 16 items. Really two (one for icons and the other for backgrounds). These are a part of the base app. In-app purchasing unlocks other "sets". These other sets are in a second table. Yes, separate tables for icons and backgrounds.
I have changed the ID numbers in the first table to start at 0. Previously they started at 1. I can now select and change both icons and backgrounds at will without issue and get the correctly selected item.
Except... when I select an item that is in the secondary icon or background table.
I have altered the ID numbers in the second table to start at one ID higher than the ending ID in the base set table.
But... the first item in the second table is being skipped. Selection of any item in the second table is showing the icon or background directly prior to the selected item. (ie. I select ID 21, I get ID 20 displayed). The first item in the secondary table is showing the last item in the secondary table.
So, my question... should the IDs in the second table start over at 0? Should they start at 1? Or is there another way to solve the skipping and incorrect selection?
Thanks in advance.
I have a fairly simple but working app right now; it's my first app and I'm working through the processes.
There are 4 Tab Bars with Table View controllers with a plus button on the top right. The user clicks that button and is presented modally with a Modal View Controller. They are asked to fill in 4 sets of information in text fields and when they click save, it saves it to the Core Data database, dismisses the View and adds that information to the Table Views. Let's call the items that the user fills in:
Name
Title
Date
Amount
The 4 tab bars are just different views of the same information. For example, Tab Bar 1 has Date as the section header and name, Amount and Title in each row. Nice and easy.
Tab Bar 2 has Name in the section title with Date, Amount and Title in the row. Tab Bar 3 has Title in the section title, etc. You get the idea.
Rather than just doing this though, in Tab 2, 3 and 4, I want to actually JUST have the section headers as buttons of some form that when clicked, takes a user to that particular entry. For example, in Tab Bar 2, I have the name as the section - I want to remove the rows associated with that entry and have just sections (or buttons) with the Names; I click on a name and it takes me to another view controller which will contain all of the Title, Amount, Dates, information, etc.
My question is, what's the best way to go about this approach of removing the rows in the sections and somehow making the sections clickable buttons?
My thinking is rather than use tableViews, use buttons, etc, but is there an elegant way to do this with having already implemented NSFetchedResultsController for each of the table views in each of the Tab Bars.
Any assistance would be massively appreciated.
Thanks,
EDIT:
I have just thought of a possible way to achieve this and it would be great if anyone could validate my thoughts. Rather than create a button, have a UICollectionView in the Tab 2, 3 and 4 providing the attributes from Core Data. So the UICollectionView for tab 2 can assign the NAME attribute to the label inside the Cell and then it can act like a cell and be clicked on. This sounds like the most feasible way to achieve this.
Looked many things up, but never posted before. Here's my situation. Any help would be most appreciated.
I've got a wizard with numerous screens with an associated navigation bar made using CSS. As users click from screen to screen, the navigation reflects the current wizard page the user is on. Each screen has different inputs to be collected. Database reads and writes are required during the render and submission of each page.
Here's the catch. Not every page is required. Only required pages are displayed in the navigation and the required information is stored in the database.
My goal is to reduce the number of database queries by dividing the navigation and remaining input into two separate partials. This way I don't have to render the navigation between each screen eliminating the single query every time between screens.
How would I submit the form of the current screen, render the partial view of the next screen, and yet update the query string to reflect the current partial view as well? This way if the user refreshes the page, they get the current screen.
Sounds like pre-optimization. How do you know you're going to have a problem with your navigation because of the database?
Why not separate out your navigation and output cache it?
If you bound determined to change the url without changing the content you need to use History API and if you need a fall back for browsers that don't support that you can use history.js.
My app is a holiday search app. Once the user touch 'search' button it will do a web query and gather results from various providers such as BING, YAHOO, ETC... I want to show these results tabbed according to the provider. I want to use a table to show the list of results of one provider and a tabbar on the bottom of the screen to switch providers.
The number of providers is dynamic means it can ONLY be known once the web query is done. So number of tabs required/view controllers required is NOT known prior to the web request.
Any idea how to implement this ???. Since i'm bit new to IOS dev, I would be delighted if you can provide a detailed description. Thank you. Feel free to ask any question if you do not get my problem.
You add ViewControllers to a tab bar and it will display a tab for that view controller - so you would have to put each result set into a view controller and add them to the tab bar.
be aware a tab bar can only display 5 tabs before it switches to 4 tabs and a more… controller.
A possibly better way would be to have a button that brings up a UIPickerView which has a list of the result sources. that way you can have as many result sources as you like!
I'm currently developing a crude, Blackberry app that keeps track of my spending and bank balance. The app will hold details of the items I have bought and how much they cost. The item price will then be subtracted from the main, overall bank balance. All item entries are made manually.
This is a mock-up of what I'm trying to achieve:
Above is the main menu. The top item is a banner that displays the bank balance. The other items are buttons.
The following is view for the items that have been added:
The table is text apart from the Remove Item field - they are buttons.
I'm looking for advice on how to implement both user interfaces (what classes, use a table or not?) I've been trying to implement a table to layout the buttons in the main screen and store the item list - I've not had much success! As I've said at the beginning, this is a crude application - I'm not looking to waste my time trying to implement any fancy GUI, just something functional.
Thanks.
I've been trying to implement a table to layout the buttons in the main screen
This is an overkill. Just use VerticalFieldManager as a buttons (use ButtonField for buttons) container.
.. store the item list
Check this: How to use Table View layout
Use LabelField for text cells.