Another shot at better layout of chat cells.

This commit is contained in:
Guillaume BIENKOWSKI 2013-11-13 16:03:19 +01:00
parent 5a1563d2cd
commit 7be6bace3a
2 changed files with 1 additions and 5 deletions

View file

@ -46,8 +46,6 @@
static const CGFloat CELL_MIN_HEIGHT = 50.0f;
static const CGFloat CELL_MIN_WIDTH = 150.0f;
static const CGFloat CELL_MAX_WIDTH = 320.0f;
// adding 10 px margin, because the line breaking algorithm in ios seems to need some margin...
// TODO: maybe simplify the view layout to ease the manipulations
static const CGFloat CELL_MESSAGE_X_MARGIN = 26.0f + 10.0f;
static const CGFloat CELL_MESSAGE_Y_MARGIN = 36.0f;
static const CGFloat CELL_FONT_SIZE = 17.0f;
@ -69,7 +67,7 @@ static UIFont *CELL_FONT = nil;
// shift message box, otherwise it will collide with the bubble
CGRect messageCoords = [messageText frame];
messageCoords.origin.x += 5;
messageCoords.origin.x += 2;
messageCoords.origin.y += 2;
messageCoords.size.width -= 5;
[messageText setFrame:messageCoords];

View file

@ -154,7 +154,6 @@
<reference key="NSNextKeyView" ref="796660967"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<reference key="IBUIBackgroundColor" ref="765717609"/>
<bool key="IBUIClipsSubviews">YES</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBUILabel" id="504194589">
@ -239,7 +238,6 @@
<reference key="NSNextKeyView" ref="773132586"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<reference key="IBUIBackgroundColor" ref="765717609"/>
<bool key="IBUIClipsSubviews">YES</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
</array>