How can I allow tapping on button outside cell frame? - ios

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?

Related

iOS Stackview Tap Buttons on top of each other

I have a stackview that I am using as a dropdown menu by changing the spacing to collapse and expand the stack view.
There are buttons inside the stack view of the same size. When the spacing is negative they appear on top of each other. I set the layer zIndex to determine which button I want to show on top.
I was hoping this zIndex would also determine which button receives the tap notification but instead the last button in the stack view always receives the tap.
How can I make sure the visible button (with highest zIndex) is receiving the tap?
Is there a better way for me to implement a collapsible menu of buttons?
Best regards
If you are using stackview and want to show/hide the button conditionally, then while hiding button, also write:
stackView.removeArrangedSubview(buttonInstance)
buttonInstance.removeFromSuperview()
Instrad of buttonInstance.removeFromSuperview(), also try buttonInstance.isHidden = true

How to add tabs in the cell of tableviewController

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.

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

UITableViewCell with strange behavior on touch

My view have 2 UITableViews.
The bottom button slides a table view to the front of the other as you can see at the images.
The problem is that when the table view slides up, the only clickable area turns out to the red area that I have painted on the second image.
If I touch outside this area, is actually touches the table view with green cells behind this one.
I tried disabling the userInteractionEnabled while the yellow table view is expanded but nothing works.
Any ideas?
I guess you should check userInteractionEnabled on your view hierarchy. If you have it disabled on one view, all subviews won't be interactive.
For example; if you're using UIImageView, its default value is 'NO'.

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