Pin one cell in a horizontal UICollectionView to the right : <p>I am implementing a control that behaves like an <code>NSTokenField</code> (the address picker in Mail, for example) for use in iOS. I use a horizontal <code>UICollectionView</code> and my rightmost cell is a <code>UITextField</code>. This control will appear in a form with other textfields that have right-aligned text. For my new control to look right in this context, I'd like for the <code>UITextField</code> to always be at the right edge of the <code>UICollectionView</code> and for selected tags to appear to the left of it.</p>

<p>At the moment, when I first click into this row, the textfield scrolls to the left and then it gets pushed to the right as more tags are added. Once it is flush with the right edge of the <code>UICollectionView</code> (when 'Appetizer' is added in the image below), then I start getting the behavior I want.</p>

<p><a href="https://i.stack.imgur.com/aUyFb.gif" rel="noreferrer"><img src="https://i.stack.imgur.com/aUyFb.gif" alt="Tag selection"></a> </p>

<p>I've been thinking about something like a minimum width on the <code>UITextField</code> so it takes up as much width as is available at first and less and less as tags are added. Or alternately, some way to pin the fixed-with field to the right. I haven't found a way to implement these ideas, though! </p>

<p>How can I make it so the textfield is always at the right of the <code>UICollectionView</code>?</p>
