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!
Related
Building a react app (non-native, with Rails), where there's a side navigation with links to 6 pages.
Each page displays a set of records.
In the navigation I want to display the number of records (total, and new) for the page that link represents.
Should I try not to store the counts, but to run all the queries initially (pre-load) so I can get the counts?
Would you recommend having a parent component around the navigation and the main page that pre-loads and manages the data for the 6 pages so it can have the counts ready for the navigation to grab?
What about when the user removes an item from the page, would you just update the data in the parent component and skip any further db queries?
Or....?
There are of course a number of ways this can be resolved and the optimal way can be subjective based on your specific needs. One possible way to set this up would be to:
Use counter caches to store the count as suggested by max.
On initial page load, query to find the count for all tabs and keep in state in the navigation bar.
For the data on the individual tabs, when data is created or removed just update the count in navigation bar with a callback function.
This way you won't have to run a query to count the items initially and then no further queries or complicated logic is required to keep the count up to date.
I'm a kindergarten teacher trying to post a set of Google slides to support online learning. I have a very modest understanding of HTML. I want students to move to new slides by clicking hyperlinks, not by scrolling through like a presentation, so I made each slide (10-12 total) its own presentation. It works, but every time you navigate from one to the other, it opens it in a new tab, which quickly turns into too many tabs. I don't see a way to create links that open in the same window.
campus (only READING link is set up at the moment)
thanks!
There is code you could add to a SINGLE presentation slide that would open in a 'preview' tab which is a little different than present mode. You would have to put all slides back into 1 slide presentation(file). Replaced everything at the end including the word edit.
https://docs.google.com/presentation/d/1MV8HjEo4HAD9q9EwE8T77WbcwOxpUk48JogS9ffecLw/edit#slide=id.p
Then I would replace the above with--look at the end of the code.
https://docs.google.com/presentation/d/1MV8HjEo4HAD9q9EwE8T77WbcwOxpUk48JogS9ffecLw/preview?rm=minimal
Now clicking the links would keep the user on the same slide deck throughout all their clicks. They can advance or go back depending on your links inside the presentation
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.
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
I'd like to create a content box with two tabs. Each tab is associated with a table which contain server-side data. My thought right now is just to load the page with 10 rows worth of data for each table and hide/display each table respectively to begin.
I was then going to toggle display of the tabbed content based on either click events on the tabs OR GET parameters relating to which tabbed content is being acted on (through pagination, for example).
Should I just handle this with UI tabs or is toggling display reasonable in this case? Since the user can update their data, I assume that caching via the tab UI isn't helpful in this case.
Thanks,
Brendan
From what I understood, I don't think its going to be overkill. If you are worried about performance, ten rows for 2 tables is just 20, which is not much. Paginating will also get 10 more rows for each 'click' so it's still good there.
Do use tab activation through click events, but also use GET parameters to know in which page the user currently is, from which tab.
Regarding caching data that you know will change, it might be unnecessary (see my 1st paragraph). Caching can sometimes become unwieldy, so don't add an uneccesary layer of complexity.
As someone who suggests simplicity above all else, I'd discard the whole 'tab loading' thing but leaving the tabs per se (i.e. the interface elements that will be clicked) and when the user clicks each tab, it takes to another page with the tabs too, old-fashioned style.