如果设备切换到iphone 4,任何人都可以告诉我自动包含@ 2x图像的代码.我已经搜索了很多,但还没有找到任何成果.
我已经在我的资源文件中包含了@ 2x图像.我想要编写代码,以便在iphone 4上运行应用程序时图像调整大小并重新定位.
我的代码是
//自定义表格视图单元格的外观.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
/// labels - names of Cities ///
UILabel *lblCity = [[UILabel alloc]initWithFrame:CGRectMake(15, 00, 200, 22)];
lblCity.font = [UIFont systemFontOfSize:14];
lblCity.backgroundColor = [UIColor clearColor];
//lblCity.backgroundColor = [UIColor redColor];
UILabel *lblDate = [[UILabel alloc]initWithFrame:CGRectMake(200, 00, 200, 22)];
lblDate.font = [UIFont systemFontOfSize:14];
lblDate.backgroundColor = [UIColor clearColor];
//lblDate.backgroundColor = [UIColor redColor];
UILabel *lblSchool = [[UILabel alloc]initWithFrame:CGRectMake(350, 00, 400, 22)];
lblSchool.font = [UIFont systemFontOfSize:14];
lblSchool.backgroundColor = …Run Code Online (Sandbox Code Playgroud)