So I made an app designed around navigating through tons of information for a school. A large portion of the app is huge table views of 100+ people for the faculty roster that redirects you to that person's specific information. What we have found is that the people who use it navigate to the same people every time, and find it annoying to scroll through a huge list of names to find the one they want. I want to solve this problem by giving the users a 'favorites page' where they can add the faculty they frequently use to their own table view. Does anyone know how I could do such a thing?
Thanks in advance.
for removing a cell u can use the following code
self.navigationItem.rightBarButtonItem = self.editButtonItem;
to get favorite page u have to create array and assign the cell which i s selected and pass the elements to favorites page...U can try the following link where u can search for passing the value between views..
http://www.youtube.com/user/GeekyLemon
Related
I need to create a tableview with at least two sections, transportation and hotel. Tapping on either one creates a drop down view showing info on 1 to n examples of the topic selected. You don't know in advance what data is going to be there so it has to be dynamic to present any number of results with some having lengthy descriptions below each example and some not. I've been racking my brain and I can't figure out how to do this. The dynamic nature of this makes it extra difficult. Here is a mock up of what it should look like: click here
Check out this Git-Repo. I am using it inside my app and its working quite well. You can also watch the tutorial for it: https://www.youtube.com/watch?v=22zu-OTS-3M&t=1s
Hope that helps!
I am very new to swift and currently making an app for a school project. The app is supposed to show a collection of recipes. I have begun by having a scrolling grid of buttons (stackviews and scrollviews). Each recipe is supposed to connect to a specific recipe, and when clicked segue to a view that has the information for the recipe (image, ingredients, instructions, etc.). I would like to do this by creating a a basic recipe view file that has a space for an image, title, and text. Then, depending on what button was pressed, fill in the view with the correct information and display the view.
I have figured out an alternative method that I could use, but it is very bulky and tedious. I could set up views for the ~25 different recipes separately, and link them individually to each button.
I would much rather prefer the first option, but I am not quite sure if it is even possible, or if I am just really bad at using the right search terms in google. I know many other apps have similar systems set up, for example a social media profile is the same template for everyone, just has different data displayed inside of it.
Can anyone help me out? Thanks in advance.
You can use UITableView for this task and have a model array that you fill with the required data ,and for action use didSelectRowAt to find which cell is clicked send the data to the next VC
Attempting to write a delete function. I am building an app to list courses after a button is clicked. I am using a text view to display this information and appending each course with a new line. Now i want the user to be able to delete a course. I was thinking if i can keep track of which line the user is on right now, then i can also tell which line the user will like to delete. Thoughts? Maybe there is a better way of doing this, perhaps using labels instead of text view?
EDIT: Use table view /s
You should use a UITableView to create a section for "Courses" and create rows in it with your courses.
And you should handle the insert/delete with the UITableView methods.
Check this out, or similiar tutorials out there.
Perhaps you could use a UITableView to achieve this. One benefit to using a UITableView is you can use built in functionality for deleting and creating new items. Here is a guide on UITableView.
What I basically want is to show the user's name in the first tableView but have a disclosure indicator (segue) to go to a second tableView which will show the history of the selected user. I know how to load data into a table and how to segue from one row to the detail table but I just don't know how to show different data for each user. I know this may be out of my scope of knowledge at the moment but I would like to give it a try.
1- What would be the best way to store the data for each user (history), an array per user?
2- How can I relate data to a specific user so it loads when the user's name is touched?
3- How can I capture the row being selected?
Any suggestions will be appreciated.
Honestly, you shouldn't worry about it being outside of your scope of knowledge, as that's how people learn. You will need to do some amount of work, however, and that part can be a little difficult.
Luckily, what you're trying to do is a very well documented function and Xcode even provides a template for master -> detail views.
Check out this wonderful tutorial by Ray Wenderlich on creating a simple master-detail application: http://www.raywenderlich.com/1797/ios-tutorial-how-to-create-a-simple-iphone-app-part-1
His other tutorials will also be immensely helpful to beginning iOS development: http://www.raywenderlich.com/tutorials
I am new to iOS app development.
I am developing an app which will show a list of companies.
This list is shown in a UITableviewController.
It has many labels like company name, their field in industry etc.
Once the list is displayed i want to give an option to filter based on their fields i.e.
listing all telecom industry or etc based on my login.
If the user is from a telecom industry i want to show all telecom related companies if user is from a service industry I want to show all service related industry and so on.
I want to give either a drop down on top or buttons or anything that will be easy to see and understand for the user to filter this out.
Please give me an ideas and if possible tutorials to achieve it.
Deeply appreciate your efforts,
Thanks
One way to do this, you can keep all the content in NSArray and you can put a set of buttons or a drop down list ( you can use NIDropDown) if you really want to have a professional look to categorize filters.
User will select any filter from the list and you need to filter the NSArray to extract the required information based on the action performed by the user on drop down list and reload the data in the UITableview.
follow these links to know how to create tables.
http://www.appcoda.com/ios-programming-tutorial-create-a-simple-table-view-app/
http://www.techotopia.com/index.php/Creating_a_Simple_iOS_5_iPhone_Table_View_Application
talking about filters , you can create two view controllers. On first you show all fileds that are present in a table view and user can select by tapping on anyone of them.
use delegate method tableView:didSelectRowAtIndexPath:. inside this method write the code to move to the next screen where details can be shown as per the user's selection.
tableView:didSelectRowAtIndexPath:
{
nextviewController = [secondDetailedView alloc]init];
[self.navigationcontroller pushviewcontroller: nextviewController Animated:Yes ];
}
now obviously you need a navigation controller that can be created in appdelegate method. What data has to be shown on next screen in table is up to you (on user's selection).