Xcode Adding multi image in a table cell that can scroll Horizontal - iphone

Im making a restaurant app that allow me show 1 restaurant with many images in a table cell. I know how to customize the table cell.
Problem is I dont know how to add many picture into a table cell that can scroll Horizontal to view the image one by one. I added a scrollview in a table cell then add image inside the scroll but it not work when i scroll the image.
Can anybody help to give me some hint to do this?
Thanks so much,
Quang

Add a UIScrollView on top of the UITableViewCell, then fill the scroll view with images. There are plenty of tutorials on the interwebs about how to do this.

Related

how to create a sectioned TableView for profile in iPhone

I saw this picture on Internet:
the section with the add Photo Frame and two rows (First, Last)...
How do you achieve a design like that!!!
I only know how to make rows (static and dynamic) in xCode using the full width of the screen but not in a single section but not making such a divisiĆ³n and adding a frame out of the other two rows
my designs are like this
Any help I'll appreciate
thanks in advance
It's not really clear that the example you've given is actually embedding the first, last part into a table view. It could just as easily be a single cell that has embedded views with borders to look like rows. Here are a few ways I see to accomplish the view you've given.
Have them be actual rows - but use a custom cell layout that offsets the 'First' and 'Last' labels to be further to the right. Then create a UIImageView for the profile that sits on top of the UITableView cells, but inside of it. Basically insert it as the first subview of the UITableView. It should cover the top left of those top two cells. You can do this since those cells have a static known hight and you've set the left offset. Another option would be just inserting it into your top cell, but having it overflow the bounds and setting clipsToBounds = NO.
Make the entire top view a custom UIView that uses CALayers or CoreGraphics to manually draw the lines and layout such that it looks like part of the table view. Set that as the TableView header, or the first section Header.
There are a lot more things you can do like changing frame layout as well.
you can achieve this with the use of xib read carefully and if you don't understand anything you can ask me again it's bit tricky
in you xib create a UIView and design for your photo and firstname, lastname cells with the use of textfields image views and all and then take a UITableView.
now drag your UIView and drop it on your UITableView so that it will be considered as your table header and your first section now will be as you designed like photo with firstname and lastname fields.
i've done this in manier projects of mine so hope this way you can also do this thing and ask me if you need any help.

UIImageView and UItextView inside TableView

I'm working on iOS RSS app, and my last view, which is a UIViewController, is similar to the attached image. I inserted in my DetailView.xib, one Image View to pass the images of the RSS feeds and two Text View to pass the title and summary respectively.
The question is, how can i make the same, but inside a UITableview?
you can use custom cells for it and can add this custom cell at particular index. At first index you just add image view and at second index you just add textview.
Check out this pretty good tutorial Custom UITableViewCell Using Interface Builder.
i hope it helps you.
You can achieve this particular thing by using Custom Table View Cell.
Table View gets created using single Table View Cell again and again. It is much more efficient and uses less memory.
You should check this tutorial.
I hope it will help you.
Thanks
You can make TableView height UITableView.automaticDimension and make sure UITextView autoscroll is disabled and constraint should be leading, trailing, bottom and top.
Here's the link this might work for you:
How to make a UITextView Expand with the text like the Notes app

UITableView - Add subview to cell content view on row selection

How can I add an UIView as a subview in a cells contentView when the user has tapped the cell, and remove the same UIView when the user taps that cell again?
I am trying to make a list of photos in a UITableView with expand/collapse button. The UIView that I want to add is the container of photo's information. Instagram accomplished it, but I cant figure out how to do it
Please help me guys :)
Thanks!!!
I don't think you want to add a subview to the cell, but you want to add another cell to the already existing table. This way, you can achieve an "expand/collapse" feel to your table by using insertRowsAtIndexPaths:withRowAnimation:
Good luck!
Adding and removing the views in the cell should be easy enough inside didSelectRow, but you may need to keep track of which rows are in what state (big or small) by recording that in a mutable array. The bigger issue you will have is adjusting a cell's height, but look here for that.

UIScrollview header

i am creating a book store Application,so i am showing books in a scroll view with background image(shelf image),i have added bouncing functionality to scroll view,i am adding buttons with book images to scroll view like grid in 4x3 thumbnails
when i scrolled to top the background image is repeating with those shelfs,its ok for me
but when i dragging(bouncing) Scroll view to down its repeating same shelf on the top
so how can i add any header to Uiscrollview to show like Apple ibooks
Can any one help me ..thx in Advance...
If you want to add a header, designate a table view delegate (can be the same as your data source) and give it the methods tableView:viewForHeaderInSection: and tableView:heightForHeaderInSection:. From the first one you return the view you want as the header. The second one is obvious.
I'm not sure if that will solve your problem, because I'm not sure I understand your problem or how you propose to solve it.

Custom cell in UITableView

I am making a custom cell which has text fields and as a result the custom cell is greater than the size of the iphone screen.But i am not being able to do horizontal scroll to reach the end of the cell.
I have tried using viewController and adding table view to it as well as creating table view controller and adding custom cell to it.
when doing it through TableViewController,I am not able to horizontally scroll it,whereas i am not getting how to add Custom cell class to the tableView object placed in viewController.I know that UITableView is a subclass of UIScrollView but not able to implement it.Please help.
Thanks
as per the documentation at
A table view in the UIKit framework is limited to a single column
because it is designed for a device with a small screen. UITableView
is a subclass of UIScrollView, which allows users to scroll through
the table, although UITableView allows vertical scrolling only.
so as desired in your case you will have to take some other approach. Now using Custom cell with TextFields should not actually need you to require Horizonatl scrolling. If the text is really large you would like to consider using TextView instead of TextFields.
Hope it helps
Ideally, you should be truncating your text. But if it is important for you to display the entire text, add a scroll view as a subview (or set it as the content view) and add your labels to the subview. Each cell will then be individually horizontally scrollable.