Tag: iphone

更改Core Plot饼图标题的外观

我想在我使用Core Plot生成的饼图中使用纯黑色背景。 我有很好的图表渲染,但标题是默认的blackColor,很难在黑色背景上看到。 我知道它正在显示,因为当我改变主题时,我可以看到它是黑色的。 谁能像我对数据标签一样告诉我如何更改文本颜色? 这是我的代码片段…… graph = [[CPTXYGraph alloc] initWithFrame:self.view.bounds]; CPTGraphHostingView *hostingView = (CPTGraphHostingView*)self.view; hostingView.hostedGraph = graph; CPTPieChart *pieChart = [[CPTPieChart alloc] init]; pieChart.dataSource = self; pieChart.pieRadius = 80.0; pieChart.identifier = @”PieChart1″; pieChart.startAngle = M_PI_4; pieChart.sliceDirection = CPTPieDirectionCounterClockwise; [graph addPlot:pieChart]; graph.title = @”Proportion of Sessions per Sport”; } -(CPTLayer *)dataLabelForPlot:(CPTPlot *)plot recordIndex:(NSUInteger)index { static […]

如何从iOS上的DICOM文件中提取像素数据?

有谁知道如何从DICOM文件中提取像素数据并将其传递给iOS上的图像查看器? 很抱歉,如果这是一个简单的问题,但它似乎是我打开的大量蠕虫的主要组成部分。

iOS核心数据:对核心数据和数据库感到困惑

我真的很困惑核心数据实际上是什么。 或者我想我的问题是,在处理数据库时,您会使用Core Data吗? 就像我想从数据库访问值一样,我会使用Core Data来访问这些值吗? 我该如何处理这个问题? 十分感谢你的帮助。

UIToolbar项目消失 – ios6中的奇怪错误

这是当前的设置。 我有3-5个按钮的navigationController工具栏,点击它们会隐藏工具栏2秒钟,然后再次显示工具栏(第5个按钮除外 – 它会显示带按钮的动作表(动作和取消))。 点击1-4按钮,我做了一个self.navigationController.toolbarHidden = YES; 在2秒之后 ,我设置了self.navigationController.toolbarHidden = NO; 这会带回工具栏,一切都很好。 点击第5个按钮,显示操作表。 如果我点击CANCEL actionsheet => actionSheet dismissed =>工具栏就可以了。 如果我点击ACTION按钮,我会做一个self.navigationController.toolbarHidden = YES; 2秒后…… self.navigationController.toolbarHidden = NO; 但现在……工具栏按钮是GONE。 进一步调查…… 我可以看到toolbarButtons似乎将其alpha值设置为0。 我不知道为什么工具表操作后工具栏项的alpha设置为value = 0。 谁能告诉我这个的根本原因?

应用内购买错误的恢复按钮

我在我的应用中恢复应用内购买时遇到了问题 我已经在我的项目中应用了这行代码: [[SKPaymentQueue defaultQueue] addTransactionObserver:self]; [[SKPaymentQueue defaultQueue] restoreCompletedTransactions]; 但它调用了这个function – (void)paymentQueue:(SKPaymentQueue*)queue restoreCompletedTransactionsFailedWithError:(NSError*)error { NSLog(@”error”); } 我必须做些什么才能避免出现此错误? 并调用此函数: – (void) paymentQueueRestoreCompletedTransactionsFinished:(SKPaymentQueue *)queue { NSMutableArray *purchasedItemIDs = [[NSMutableArray alloc] init]; NSLog(@”received restored transactions: %i”, queue.transactions.count); for (SKPaymentTransaction *transaction in queue.transactions) { NSString *productID = transaction.payment.productIdentifier; [purchasedItemIDs addObject:productID]; } } 先谢谢你们!

我应该把我的图像放在iPhone项目中的哪个位置?

我是iPhone开发人员的新手。 现在我有一个项目,其目录结构如下所示: Tutorial \__Tutorial\ \__1.png \__TutorialViewController.h \__TutorialViewController.m \__TutorialViewController.xib \__Supporting Files\ \__Frameworks\ \__Products\ 我尝试使用[UIImage imageNamed:@“1.png”]将图像渲染到视图中: UIImage *image = [UIImage imageNamed:@”1.png”]; imageView.image = image; [image release]; 但图像没有显示出来。 所以我想知道我应该在哪里放置图像? 另外,如果我有很多图像(如1000号),应该怎么办? 这是我的代码: #import “TutorialViewController.h” @implementation TutorialViewController @synthesize labelText; @synthesize imageView; -(void) click:(id)sender { NSString *titleOfButton = [sender titleForState:UIControlStateNormal]; NSString *newText = [[NSString alloc]initWithFormat:@”%@”,titleOfButton]; // Change Image When Clicking Color […]

CTServerConnectionGetCellID例程核心电话

我想要检索一些蜂窝网络信息,如cellId和LAC。 我知道没有正式的方法可以做到这一点,但我仍然遇到一些CoreTelephony例程,如CTServerConnectionGetCellID。 运气好吗? 任何帮助?

多个彩色贝塞尔曲线路径

这是我的免费手绘图代码。 但是当我绘制路径时,之前的路径就消失了。 我无法弄清楚为什么会这样。 有谁能够帮助我。 这是我的代码。 – (void)drawRect:(CGRect)rect { for (NSMutableDictionary *dictionary in pathArray) { UIBezierPath *_path = [dict objectForKey:@”Path”]; UIColor *_colors = [dict objectForKey:@”Colors”]; [_colors setStroke]; _path.lineCapStyle = kCGLineCapRound; [_path stroke]; } } -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { isEdited=YES; myPath=[[UIBezierPath alloc]init]; myPath.lineWidth=lineWidths; CGPoint touchPoint = [[touches anyObject] locationInView:self]; UITouch *mytouch=[[touches allObjects] objectAtIndex:0]; [myPath moveToPoint:[mytouch locationInView:self]]; […]

Objective-C:尝试在ipad设备上显示应用程序时在控制台上出错?

我试图在我的iPad上显示我的iphone / Ipad应用程序但是出现此错误,我之前在设备上检查了此应用程序,但现在它在控制台上给出了错误。 **warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1 (8C148)/Symbols/usr/lib/info/dns.so (file not found).** **无法在引导服务器上注册com.domainname.abcdef。 错误:未知错误代码。 这通常意味着此进程的另一个实例已在运行或挂在debugger.Program接收信号:“SIGABRT”。 警告:无法读取/Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1(8C148)/Symbols/Developer/usr/lib/libXcodeDebuggerSupport.dylib(未找到文件)的符号。** 我的应用程序在模拟器上正常工作但在设备上出现此错误,前提是昨天它也在使用相同代码的设备上工作。 我重新启动了Xcode,删除了build文件夹但没有成功。

更改NSManagedObject属性而不触发委托方法?

有没有办法(或技巧)我可以修改当前由委托的NSFetchedResultsController持有的NSManagedObject而不触发didChangeObject:和controllerWillChangeContent:委托方法? 例如,如果我更改myObject.property = @”hello”; ,则为current myObject.property = @”hello”; ,触发委托方法并对我的表视图进行更新,但我不希望这种情况发生,但仅限于我明确指定的某些更改,而不是所有更改。