Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Commit

Permalink
Versionando
Browse files Browse the repository at this point in the history
  • Loading branch information
rubensmachion committed Sep 22, 2015
1 parent ce486f6 commit 3e20146
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions Util.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,6 @@

@implementation Util

/** Retorna a quantidade de linhas em um UITextView */
+ (int) qtdLinhasTextView:(UITextView *) _textView {

NSLayoutManager *layoutManager = [_textView layoutManager];
unsigned numberOfLines, index, numberOfGlyphs = (int)[layoutManager numberOfGlyphs];
NSRange lineRange;
for (numberOfLines = 0, index = 0; index < numberOfGlyphs; numberOfLines++){
(void) [layoutManager lineFragmentRectForGlyphAtIndex:index
effectiveRange:&lineRange];
index = (int)NSMaxRange(lineRange);
}

return numberOfLines;
}

/** This method return a UIView First Responder of recursive form */
+ (UIView *) findFirstResponder:(UIView *) _view {

Expand Down

0 comments on commit 3e20146

Please sign in to comment.