Horizontally scroll UITextField in a UITableViewCell if text overflows - ios

How would I be able to horizontally scroll a UITextField in a UITableViewCell if the text overflows? I want it so that the user can scroll the text to see all of it, but it should not interfere with the swipe left to delete gesture in a UITableView. Is there a way to do this?

This should be happening automatically, but the hit regions are very small. This will likely lead to user confusion since two gestures in very small areas do two different things.
Are you sure that's a UITextField you're using in the cell? Looks like it's a UILabel because of the truncation.

Related

Is there a way to change scrollview focus programatically?

In Swift, is there a way to change scrollview focus programatically? For example, in one of my scrollviews when a user is scrolling, after the scroll has gone past a certain distance I want the scroll to stop scrolling and to immediately scroll a tableview instead. I want this to all happen in the same motion/swipe, so I need to automatically shift the focus from the scrollview to the tableview using code. Is this possible?
Using Rikh's comment, I was able to solve this using a UITableView with multiple sections and custom UITableView headers. I can use the viewForHeaderInSection method to create a custom floating header which is exactly what I need and it scrolls much more smoothly.

Is it possible to figure out what part of the cell is visible from inside the cell subclass?

In my cell subclass the user can slide the cell for actions, just like in Mail.app. However, the cells can be much larger than Mail.app, sometimes up to 1,000pt which means it requires the table to be scrolled to read fully.
This means that the normal strategy of simply centering the actions vertically in the cell will not work, as the vertical center could very well not be visible. So I want to display it in the vertical center of the visible area.
Is this possible to do within the UITableViewCell subclass where the sliding action is occurring? Figuring out where the vertical center of the visible area even is?

Strange behaviour of UItextView inside Tableview cell

I have a UItextView inside a UITableViewCell. When I select some text inside the textview, I have a strange animation: the cell or the textview (I don't know wich scrollview is really moving, may be both) start scrolling up and down maybe because both scrollviews (Tableviewcontroller's scrollview or UItextView's scroll view ) want to focus the selected text for their own in different ways. I've tried anything but this bad animation is still here.
The Tableviewcontroller and the textfield was made with storyboard.
ps: sorry for bad english
Use
[tableView setScrollEnabled:NO];
when the textView is focused.
if you want to show a static text just use the uilabel, which is enough.
but if you want to show and let the user edit the textview, you may allow to edit it while the tableview is in edit mode.

UITableViewCell reorder element overlaying detail text label in iOS 7

Prior to iOS7, the reorder icon would move the cell's detail text UILabel to the left and allow space for the reorder icon. Now the reorder icon overlays the detail text. Does anyone know how to stop this behavior?
This question is also the same as iOS7 UITableViewCell reorder control overlap detailTextLabel with UITableViewCellStyleValue1
I've found the same problem, and have yet to find a nice solution. I did notice, though, that this only seems to be a problem if the TableView style is 'grouped'. If you change the style to 'plain' the TableView shifts the cells content in from the right as you'd expect.
So, depending on your particular needs, you might be able to change the table style.

Artifact on UITableView

I've created a UITableView and am using a custom UITableViewCell for the first row of this table. The only issue is there is some sort of artifact in the top left hand corner. Clicking in the area where this box is causes it to temporarily disappear and then reappear again. The box is always there. The UITableViewCell consists of the following:
UITextView (Description)
UIImageView (Image on far right)
UILabel (Character count)
I've tried removing all of these subviews and the box still appears.
If the box still appears even if you remove all the subviews of your custom cell, then it must be coming from another cell which has a frame outside its bounds. For example, a header view. One way to test this is to make sure you enable subview clipping for all your views.

Resources