小编Har*_*ami的帖子

将`UITableViewCell`分成几部分

我正在创建一个应用程序,我必须将一个单元格分为三个部分.例如,我必须在一个单元格中给出标题并在下面显示相应的数据.

我怎样才能做到这一点?


- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:
   (NSIndexPath  *)indexPath
Run Code Online (Sandbox Code Playgroud)

{

static NSString *CellIdentifier = @"Cell";
myappAppDelegate *mydelegate=(myappAppDelegate *)[[UIApplication sharedApplication]delegate];

 database *objdata =[mydelegate.myarray objectAtIndex:indexPath.row];
 UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) 
{
     cell = [[[UITableViewCell alloc] 
     initWithStyle:UITableViewCellStyleSubtitle     
     reuseIdentifier:CellIdentifier] autorelease];

    cell.accessoryType = UITableViewCellAccessoryNone;



    if (indexPath.row == 0) 
    {
        UILabel *temp = [[UILabel alloc] initWithFrame:CGRectMake(20, 0, 200, 44)];
        temp.text =@"Main Balance";  
        temp.backgroundColor = [UIColor clearColor];
       temp.font = [UIFont systemFontOfSize:19];
        [cell addSubview:temp];

        UILabel *temp1 = [[UILabel alloc] initWithFrame:CGRectMake(240, 0, 50, 44)];
        temp1.text …
Run Code Online (Sandbox Code Playgroud)

iphone uitableview ios

4
推荐指数
1
解决办法
2708
查看次数

如何在iPhone应用程序中显示图形

我是iphone的新手.我创建了应用程序,我在其中维护有关收入,费用和总余额的数据.我需要在图表中显示该信息.

问题: - 我如何在我的Iphone应用程序中显示图形???如假设如果总余额为1000且收入为500则在图表中显示整体图表包含总balacne表示100%,收入将显示为20%


现在我在我的应用程序中使用CorePlot获取图形但是我提供了静态数据ON Axis ..我想显示来自数据库的数据..我该怎么做?

iphone objective-c ipad ios ios-simulator

0
推荐指数
1
解决办法
7875
查看次数

标签 统计

ios ×2

iphone ×2

ios-simulator ×1

ipad ×1

objective-c ×1

uitableview ×1