diff options
author | Dustin L. Howett <dustin@howett.net> | 2010-10-04 06:10:43 -0400 |
---|---|---|
committer | Dustin L. Howett <dustin@howett.net> | 2010-10-04 06:10:43 -0400 |
commit | 54b844a077e17de31c79cb71d8b6948f8b152a8e (patch) | |
tree | 5a535277eb1dc39fc59613d18f08d5d3fc8c7139 | |
parent | fe9c8d24cf66dbdc80b36349552213c13b67bf5d (diff) |
Use drawAtPoint:forWidth:withFont:lineBreakMode: instead of drawAtPoint:forWidth:withFont:ellipsis:, as the latter is deprecated and actually crashes now for some reason.
-rw-r--r-- | Cydia.mm | 14 | ||||
-rw-r--r-- | iPhonePrivate.h | 1 |
2 files changed, 7 insertions, 8 deletions
@@ -4829,12 +4829,12 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { if (!selected) UISetColor(commercial_ ? Purple_ : Black_); - [name_ drawAtPoint:CGPointMake(48, 8) forWidth:(width - (placard_ == nil ? 80 : 106)) withFont:Font18Bold_ ellipsis:2]; - [source_ drawAtPoint:CGPointMake(58, 29) forWidth:(width - 95) withFont:Font12_ ellipsis:2]; + [name_ drawAtPoint:CGPointMake(48, 8) forWidth:(width - (placard_ == nil ? 80 : 106)) withFont:Font18Bold_ lineBreakMode:UILineBreakModeTailTruncation]; + [source_ drawAtPoint:CGPointMake(58, 29) forWidth:(width - 95) withFont:Font12_ lineBreakMode:UILineBreakModeTailTruncation]; if (!selected) UISetColor(commercial_ ? Purplish_ : Gray_); - [description_ drawAtPoint:CGPointMake(12, 46) forWidth:(width - 46) withFont:Font14_ ellipsis:2]; + [description_ drawAtPoint:CGPointMake(12, 46) forWidth:(width - 46) withFont:Font14_ lineBreakMode:UILineBreakModeTailTruncation]; if (placard_ != nil) [placard_ drawAtPoint:CGPointMake(width - 52, 9)]; @@ -4988,7 +4988,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { if (editing_) width -= 87; - [name_ drawAtPoint:CGPointMake(48, 9) forWidth:(width - 70) withFont:Font22Bold_ ellipsis:2]; + [name_ drawAtPoint:CGPointMake(48, 9) forWidth:(width - 70) withFont:Font22Bold_ lineBreakMode:UILineBreakModeTailTruncation]; CGSize size = [count_ sizeWithFont:Font14_]; @@ -5750,15 +5750,15 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { if (!selected) UISetColor(Black_); - [origin_ drawAtPoint:CGPointMake(48, 8) forWidth:(width - 80) withFont:Font18Bold_ ellipsis:2]; + [origin_ drawAtPoint:CGPointMake(48, 8) forWidth:(width - 80) withFont:Font18Bold_ lineBreakMode:UILineBreakModeTailTruncation]; if (!selected) UISetColor(Blue_); - [label_ drawAtPoint:CGPointMake(58, 29) forWidth:(width - 95) withFont:Font12_ ellipsis:2]; + [label_ drawAtPoint:CGPointMake(58, 29) forWidth:(width - 95) withFont:Font12_ lineBreakMode:UILineBreakModeTailTruncation]; if (!selected) UISetColor(Gray_); - [description_ drawAtPoint:CGPointMake(12, 46) forWidth:(width - 40) withFont:Font14_ ellipsis:2]; + [description_ drawAtPoint:CGPointMake(12, 46) forWidth:(width - 40) withFont:Font14_ lineBreakMode:UILineBreakModeTailTruncation]; } @end diff --git a/iPhonePrivate.h b/iPhonePrivate.h index bf49914..589dcf3 100644 --- a/iPhonePrivate.h +++ b/iPhonePrivate.h @@ -34,7 +34,6 @@ typedef enum { @interface NSString (Apple) -- (void) drawAtPoint:(CGPoint)point forWidth:(float)width withFont:(UIFont *)font ellipsis:(NSInteger)ellipsis; - (NSString *) stringByAddingPercentEscapes; - (NSString *) stringByReplacingCharacter:(UniChar)from withCharacter:(UniChar)to; @end |