How to add tabs in the cell of tableviewController - ios

hello I want to know how can I add tabs in the tableviewcontroller like this
I want to add tabs Contact and About similar to image and also a line between them. These tabs are in the mid of screen not at the bottom.
I have another question is when I press my thumb on this image portion and move my thumb downwards the image size increases. How can I do that. When I do in my controller white background comes up.

You could put buttons at the bottom of the cell and then have the button handlers reload elements in the cell's view.

Related

How can I allow tapping on button outside cell frame?

I have added cross button on the edge of collection view cell and half part of this button gets overlapped by the cell below it. How can I make the lower half for this button tappable?
Edit:
Is there anyway we can change the zposition for button or we can make it appear above the collection cells?

UITableView and UINavigationBar customization confusion. Any advice on how this was done?

Here is a part of the AirBnB app I would like built.
Here are the 3 questions that I'm in need of advice on.
How do i get a cell on a UITableView to act like the [ MORE FILTERS ] button? The button seems to act like a UITableView cell that always stay at the top. YET, it fades away just before going out of scope. Is this even a tableViewCell?
The view [ARRIVES | DEPARTS]. What view is this on a UITableView? When the tableView is scrolled all the way to the top it connects seamlessly with the [MORE FILTERS] button making it seem like its one view. But when the tableView starts scrolling, the [MORE FILTERS] button can be seen sliding over it as it fades away.
What is the [SHOW FILTERS] button? Is it a UINavigationItem titleView property or some separate view? As the table scrolls up it can be seen attaching itself to the UINavigationBar in a fade transition. At first i thought it was a just a UINavigationBarItem, but I do not know how to add items under the title of the bar. Any clarification on what this is or how can be accomplished?
I have already looked at Apple's Example on customized UINavigationBar, but it doesnt provide any clues to accomplish this. Any help appreciated
just like you did, when I came across an application like this one which has cool UI effects and animation, I would like to analyse and if possible try to do the same effect by myself, so that I could get innovations as well as knowledges.
Let's analyse it first, at the meantime you will probably find all the answers. I just drew a graph which shows the UI hierarchy of the screen, of course this hierarchy is based on my analysis, I cannot guarantee that the hierarchy is 100% correct.
I will do a bit of explanations here. From top to bottom:
1. The Navigation Bar(Red), just a opaque navigation bar, nothing special;
2. The Show Filters View(Purple) is a view which anchors to the bottom of the Navigation Bar(Red), and it is hided when the screen launches. Please note that this view is not a subview of Arrives & Departs View(Blue). It is added directly to the view controller's root view. Which means Purple and Blue are siblings;
3. The Arrives & Departs View(Blue), nothing special;
4. The More Filters View(Green), nothing special;
5. The Table View(Orange), nothing special;
So from my analysis, Purple, Blue, Green and Orange are all siblings.
Now let's move on to the fancy UI effects and animations. The trick here is you need to observe the change of the table view's contentOffset (I recommend to do it in the scroll view's delegate - scrollViewDidScroll), and move, hide or show the views accordingly. There are four stages:
1. The initial stage, like the graph above.
2. The Blue starts fading out, Green moves up as the finger moves, Orange increases its height. (Purple is still at the same position and hided, I just removed it from the graph in order to make it clearer);
Blue totally faded out, Green starts fading out and Purple starts fading in. Orange is still doing the same - increasing its height;
Green totally faded out, Purple totally faded in and Orange increases its height to fill the screen and then anchors to the bottom of Purple.
The [MORE FILTERS] button does appear to be a cell of the UITableView. Since it is a different type of cell than the other cells containing the UIImageView and the UILabels using a different identifier you can tell the cell to fade away with an animation. Try this link for more information.
The [ARRIVES | DEPARTS] seems to be its own view. I believe that this and the tableview are both part of a UIScrollView. This is the reason that it seamlessly disappears when the [MORE FILTERS] cell scrolls up towards it.
The [SHOW FILTERS] button could just be a part of the navigation bar. When the scrollView finishes scrolling the navigation bar can be extended. However, it is also possible that the button is in a view of its own and is hidden until the scrollview finishes scrolling. Either way should be possible but I would recommend putting it in its own view rather than attaching it to the navigation bar.

Create swipe to reveal buttons for iOS 7, using clear color for background

I followed this tutorial http://www.teehanlax.com/blog/reproducing-the-ios-7-mail-apps-interface/ to add more button beside delete button when swiping.
But the problem is the cell need to use clear color so the background image can be seen. But that approach used scrollview to display the content view and the buttons view of tableview cell. If the content view of the scrollview has any background color instead of clear color, it can hide the buttons so these buttons only display a part determined by our finger when swiping on the cell, using clear color for background makes these buttons show without the need to swipe from right to left on the cell.
So anyone can give me a suggestion to use the clear color to display the background image without revealing the under buttons?
You can use MGSwipeTableCell class for creating swipeable buttons with any colour you need. It will not interfere with the tableview cell color as well. It is very easy and quick to implement.
https://github.com/MortimerGoro/MGSwipeTableCell

Add a UIImageView to the back of NavigationBar (NOT background image)

I am trying to add a UIImageView to the back of a navigation bar.
The reason is because I want to create a UITableView whose navigation bar is actually a picture (with back button on the left) but I want the picture to scroll with the tableview and when the picture is fully scrolled out. The navigation bar is shown as per normal.
My solution to this problem:
Add a UIImageView to the top of the UITableView and make the navigation bar transparent. Set a contentOffset for the UITableView which is a subclass of UIScrollView so that when the view is presented, it looks like the picture is filling the navigation status bar.
Problem:
If I scroll up, instead of bouncing back, the transparent status bar is shown (with a color of the background as it is transparent).
Possible way to solve this new problem:
I was thinking of trying to limit the ScrollView size to get around with problem but failed.
So I feel is it possible to add the UIImageView to the "back" of the navigation bar so that it is there without any offset? Since that way, my life will be much easier.
Any suggestions on solving this or another new approach to get the same UI/effect?
Related question.
I would do this by adding either a table header or cell at the top of the table which contains your image.
Create the table view so that it extends all the way to the top of the screen. Extend Under Top Bars option. I have not done this with a UITableViewController but I have done this with a UITableView embedded inside a UIViewController's view with the top constraint set to 0 for the view rather than the top layout guide.
Now when you run this your table will fill the whole screen and the top header or cell will be at the top showing your picture.
When you scroll you can either use the UIScrollViewDelegate to detect the movement or implement tableView:didEndDisplayingCell:forRowAtIndexPath:
I'm not 100% sure when you want the navigation bar to go non clear. If its when the image goes off screen then didEndDisplayingCell should be good. If its when the cell bottom passed under the bottom of the navigation bar then scroll view might be your only option.
This will also bounce as you expect when you pull down and it should snap back to the top.
Hope this helps.

Make image view in iOS table view cell clickable

I have a dynamic table view in iOS 6. The table view cells have the subtitle style and show an image, a title and a subtitle.
The table view is inside a navigation controller, and in the navigation bar I have a bar button item which allows you to reset the progress information shown in the subtitle of the cell and in the image shown in the cell (grey image when progress is 0%, orange when bigger than 0%, green when 100%, the actual percentage is shown in the subtitle).
When the user presses the reset button, the image is replaced by a special image (a rounded arrow) which, when pressed, would allow the user to reset the progress and start the exercise from scratch.
The trouble is the image view in a cell is clickable but I cannot distinguish between a click in the image and a click in the text part of the cell (title+subtitle).
How can I do this? I'd better subclass and add a button, which is clickable?
Another consideration is that maybe the round arrow that resets should be an accessory view and appear on the right?
I would just use UIButton and add a custom background image. That should work, as you mentioned.

Resources