Память быстро увеличивается до высокого значения, когда появляется клавиатура - PullRequest
0 голосов
/ 28 июня 2011

У меня есть два текстовых поля в uitableview.Я создаю их следующим образом:

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *MyIdentifier = @"MyIdentifier";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:MyIdentifier];
if (cell == nil) 
{
    cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:MyIdentifier] autorelease];

    if ([indexPath row] == 0) {
       // text = [[UITextField alloc] initWithFrame:CGRectMake(5, 5, 300, 30)];
        text.delegate=self;
        text.userInteractionEnabled=NO;
        text.contentVerticalAlignment=UIControlContentVerticalAlignmentCenter;
        if(qNum-1==53)
            text.placeholder=@"Category";
        [cell.contentView addSubview:text];
        [text release];

    }
    if ([indexPath row] == 1) {
      //  text2 = [[UITextField alloc] initWithFrame:CGRectMake(5, 5, 300, 30)];
        text2.delegate=self;
        text2.userInteractionEnabled=NO;
        if(qNum-1==53)
            text2.placeholder=@"Subcategory";
        text2.contentVerticalAlignment=UIControlContentVerticalAlignmentCenter;
        [cell.contentView addSubview:text2];
        [text2 release];
    }

}

cell.accessoryType = UITableViewCellAccessoryNone;
cell.selectionStyle = UITableViewCellSelectionStyleNone;
return cell;

}

Моя проблема в том, когда появляется клавиатура и когда я начинаю печатать символы внутри текстового поля, память быстро увеличивается.Это нормально или Ват, что я скучаю?Заранее спасибо.

...