Wednesday, April 24, 2013

Sunday, April 21, 2013

UINavigationController to existing UIViewController

UIToolBar as inputAccessoryView for UITextView

right button to a UINavigationController

Border around UITextView

UINavigationViewController add in View

Localization App

Friday, April 12, 2013

http://www.cocoacontrols.com/

UILabel в цикле


NSUInteger i = 0;

for (i=0; i<[elements count]; i++){
   UILabel *label = [[UILabel alloc] init];
   NSString *tempName = [NSString stringWithFormat:@\"label%d\", i+1];
   label.tag = tempName;
   [label release]
}

Thursday, April 11, 2013

tag define


#define LABEL_TAG_OFFSET 100
#define LINE_TAG_OFFSET 200

  ((UIImageView*)[self.contentView viewWithTag:i +LINE_TAG_OFFSET]).image = [UIImage imageNamed:@"bluepolos.png"];

Monday, April 8, 2013

UILabel в цикле


NSUInteger i = 0;

for (i=0; i<[elements count]; i++){
   UILabel *label = [[UILabel alloc] init];
   NSString *tempName = [NSString stringWithFormat:@\"label%d\", i+1];
   label.tag = tempName;
   [label release]
}

UITableView. Hide cell, with button in section


UITableView: Display and hide cells as a dropdown list

layoutSubviews

Метод вызывается при работе с ячейкой в UITabliView

В нем можно переопределять фреймы, если например какого-то объеткта не пришло, каратинки например, тогда фрейм другого объеткра сменить

getter


-(UILabel *)scoreFirstLabel
{    
    if (!_scoreFirstLabel) {
        _scoreFirstLabel = [[[UILabel alloc]initWithFrame:CGRectMake(CGRectGetMaxX(_winnerFierstImageView.frame) +1, CGRectGetMinY(_winnerFierstImageView.frame) +2, 20, 10)] autorelease];
_scoreFirstLabel.textColor = RGBA(32, 43, 68, 1);
_scoreFirstLabel.numberOfLines = 1;
_scoreFirstLabel.font = [UIFont fontWithName:@"EtelkaText" size:10];
_scoreFirstLabel.backgroundColor = [UIColor clearColor];
[self.contentView addSubview:_scoreFirstLabel];
    }
    return _scoreFirstLabel;
}