小编jrt*_*ton的帖子

这种潜在的内存泄漏的原因是什么?

当我分析程序时,下面的行给了我"潜在的内存泄漏".我正在运行最新版本的xCode(4.2),程序运行没有错误,经过多次测试后从未崩溃.任何帮助将不胜感激.提前致谢

[self.topTenEntry1 setBackgroundColor:[[UIColor alloc] initWithPatternImage:[UIImage imageNamed:@"reddishcolor.tiff"]]];
Run Code Online (Sandbox Code Playgroud)

iphone xcode objective-c

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

Mac OS风格的TabView

我刚刚开始为Mac OS X编写代码,我对标签控件非常兴奋,就像这样:

在此输入图像描述

但我无法理解如何实现它.是否有标准的UIKit控件或一些外部控件,或者这只是一组按钮?

macos cocoa appkit

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

如何在标签栏应用程序中创建条款和条件页面

我有一个基于标签栏的应用程序,我希望创建一个条款和条件页面,仅在第一次启动应用程序时显示.

我该怎么做呢?

iphone ios

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

如何使UIBarButtonSystemItem接壤?

我在UIToolbar上玩UIBarButtonItem.我想让风格与众不同.因为它是系统项目,有没有办法使它成为边界风格?

UIBarButtonItem *systemItem1 = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemPlay target:self  action:@selector(play:)];
Run Code Online (Sandbox Code Playgroud)

objective-c ios

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

如何制作"无限"的UIPickerView?

我有一个用户输入时间的选择器视图.当他们向下滚动到第23小时时,我希望小时0显示为下一个项目,并且要重新开始的序列.我怎样才能做到这一点?

这是我当前的选择器视图数据源:

- (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView {
    return 3; 
}
- (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component {
  NSArray *sectionContents = [[self dataForDatapickerRows] objectAtIndex:component];    
  NSInteger rows = [sectionContents count];     
  NSLog(@"component %d rows is: %d",component,rows);    
  return rows;  
}
- (NSString *)pickerView:(UIPickerView *)pickerView
             titleForRow:(NSInteger)row
            forComponent:(NSInteger)component {
  self.dataPickerInstance.backgroundColor=[UIColor whiteColor];       
  return ([[[self dataForDatapickerRows ]objectAtIndex:component] objectAtIndex:row]);
}

- (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component {
    if(component==0)
    {
      [self setHou:(NSInteger*)[[[self dataForDatapickerRows ]objectAtIndex:component] objectAtIndex:row]];
    }
    else if(component==1)
    {
      [self setMinut:(NSInteger*)[[[self dataForDatapickerRows ]objectAtIndex:component] objectAtIndex:row]];
    }
    else if(component==2)
    {
      [self setSecon:(NSInteger*)[[[self dataForDatapickerRows ]objectAtIndex:component] objectAtIndex:row]];
    } …
Run Code Online (Sandbox Code Playgroud)

iphone objective-c uipickerview ipad ios

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

iOS的持久应用程序

我正在尝试开发一个应用程序,它需要在iOS中以后台模式持续运行,即使您没有Internet访问(3g或WiFi)也永远不会关闭.我想知道它是否可以随时运行,除非您选择手动关闭它.

iphone background-process ios

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

保存一个int值,然后加载app负载

我正在制作一个应用程序,每次用户按下屏幕时都会更改图像.它使用int知道然后更改图像.

我需要帮助来保存int值然后按下屏幕并加载它然后加载应用程序.

iphone

-1
推荐指数
1
解决办法
81
查看次数

xcode应用程序在使用断点启动时崩溃

在构建和运行(在模拟器和我的iPhone上)我现在从xcode获取以下内容并且应用程序永远不会启动...但是如果我停止在xcode中构建然后打开应用程序它似乎很好吗?

更新:是的断点当然导致应用程序暂停(我在发布之前忘记删除它)

问题在于导入和使用自定义字体.如果我删除导入的TTF并在我的plist中添加其引用的地方就可以了.至少我现在知道它的问题所在的字体

在此输入图像描述

xcode

-2
推荐指数
1
解决办法
211
查看次数