iOS re-order control overlay cell - ios

When having a black background ListView in iOS and setting the edit property to true, shows the re-order control (white horizontal lines icon) in the right hand side as it should. It also shows the delete icon on the left side of the cell and then shifts the contents to the right.
The problem is this; the re-order icon overlays the white text of the cell and you can not see the icon. I know we can't change the background of the re-order control. What am I missing that the content view is not resized but shifted during the re-order?

So as it turns out, the content view label was auto sizing to the entire width of the row. After removing this, the label resizes appropriately.

Related

How to make a tableview fill all the available space?

This is my first swift application, so apologize if it's very basic. I was unable to find it...
In my view, I've a Navigation on top (Navigation Controller) and It's using a TabBar Controller. I'd like to make the TableView fill the whole empty space no matter the size of the device nor orientation.
I set the property Content Mode to many different options, including Aspect Fill, but all the options can't cause any effect.
Any clue about it ?
First make your tableview completely fill the screen and then set the constraints to be in 0 margin from all sides, like in the image
use constraints for display full table view on empty space.enter image description here
Click on pin icon from bottom side of Xcode.
Select all for four(up,down,left,right) constraints and set 0 value for all.
after then click on add constraints button and refresh frame(click on right side button of Pin button and select Update Frame).

Background view on UITableViewCell hugs content when using slicing xcassets

I have some very simple UITableViewCells, there is just one one-line UILabel and UIImageView (white arrow). UILabel is anchored to it's parent (content view) top/bottom, the arrow is irrelevant now. When I try to set background view to UIImageView that is loading stretchable image from xcassets, this image view hugs the label which is sizeToFit'ed automatically for some reason.
I have set constraints on both label and background view to anchor them to top/bottom of content view, but they still get small.
The cell's height is 50pt, the label is about 20pt so the difference is quite visible.
Any idea what should I do to have background view fill entire content view?
EDIT:
In following image, you can see 2 cells, one of them in selected state. The bottom cell has both background view and selected background view set. Background view (black one) has no vertical slicing, it's simply image with 50pt height, the Selected background view (the red one) has slicing enabled and it hugs the label vertically.
What I want to achieve is to have slicing enabled for both background and selected background view and having it behave like the non-sliced background view on the image, that is filling entire content view of the cell
EDIT 2:
screenshot of cell layout and constraints set on the imageview that is set as background view on cell
I found related question with answer that helped, so this might be a duplicate.
UITableView - SelectedBackgroundView not working in iOS7 with Auto-Layout
Solution is to create those background view programatically as there is probably yet another bug in interface builder that is screwing this up.

Image or view on the left side of a static table cell

I created a table with 2 static cells. I managed to add a label or image on the left side of a cell. However how can I change the middle grey line to have more padding to the left?
so that it looks like in the iOS settings. Any ideas?
From the above screen shot change the value which is highlighted in red color
Right here playboy 😜
Just click the table cell in Storyboard and change this value

Autolayout position reset

I have a View and i have a an image view inside it and a another UiView and one or two more view in side the top level view. The problem is when i run my app in different screens iphone the image view resizes and i want the other view to change the their position to a little bit down. But only image view gets more space, but i don't want the other view to get more space but i want them to change their position.
Here i want the white view the Placeholder text and the the small picture view to change their position and go a bit down when the app runs on big screen iphone. Th rounded image view above the Mybutton gets more space when the screen resizes which is okay but the white view and other view remain at their same place. Just to add more information all these view are siblings of each other and i have fixed the the width and height of the white view, picture view and the placeholder text label
Any guidance please?
I think you have to start with the "movable" element and then add every "fixed" element.
I think you have to work with Center Y Alignment Contraint even if you have to create new view for it. The beginning could be :

Show "Black" when you "Scroll" down image

I have a pretty simple scroll view (code below) which i have a picture on
self.detailViewController.scroll.contentSize=CGSizeMake(320, 1200);
self.detailViewController.scroll.showsHorizontalScrollIndicator=YES;
However when i "Scroll to the extreme button or extreme top of the picture or extreme button of the "scroll view, it loops and shows the top of the picture or loops back to the buttom of the picture.
I was wondering if there was some sort of "no repeat" i could set so it shows "black" instead of back to the top of the picture.
Thank you.
colorWithPatternImage tiles the image that it is given. So setting it as the background colour will always result in 'wrap around' if the scroll view can be scrolled outside the edges of the tile image.
To prevent this, choose one of:
Set the content size to the size of the tile image and turn off bouncing
Don't use colorWithPatternImage, use a UIImageView added as a subview of the scroll view.

Resources