I have a custom cell with enabled disclosure indicator
. Enabled throw the code in cellForRowAtIndexPath:
method:
cell.accessoryType = .DisclosureIndicator
To create an illusion of space between cells I have created a UIImageView
inside my cell.
I was expecting that disclosure will be inside new cell but it is not.
My layout setup :
and how it looks like:
Can anybody suggest what I am doing wrong here?
I was expecting that disclosure will be inside new cell but it is not.
It is inside cell, but it seems outside to you because it is outside image view.
We need to extend the image view below disclosure indicator.
I did a simple trick of setting leading space constraint to negative value as:
(Above are the constrains of green view, in your case image!)
I also added disclosure indicator from .xib
instead of code as:
In .xib
it will show like above picture, but it works when we run as:
Instead of adding image, I've added UIView
with green colour, this is just to implement faster.
You can do same with UIImageView
.