jjzjj

numberWithFloat

全部标签

iphone - Core Plot ScatterPlot y 轴未缩放以适合屏幕和绘图

我一直在为我的应用程序制作一组图表,但ScatterPlot有一个非常具体的问题。我无法让图表的y轴或高度重新缩放以适合屏幕。我花了几个小时在网上搜索答案,最接近的答案是遵循raywenderlich.com教程。但我似乎仍然无法压缩y轴以使图形适合屏幕。理想情况下,我希望图表根据输入数据动态调整大小,因为绘制的数据差异可能从数十到数百不等。这是我用来设置图形的代码:-(void)configureAxes{//1-CreatestylesCPTMutableTextStyle*axisTitleStyle=[CPTMutableTextStyletextStyle];axisTitl

ios - F3PlotStrip动态添加的图有问题

我目前正在开发基于Graphs的iOS应用程序。为此,我使用了名为F3PlotStrip的第三方控件。.实现是这样的:-(void)viewDidLoad{_ecgView=[[F3PlotStripalloc]initWithFrame:CGRectMake(50,50,648,299)];_ecgView.lineColor=[UIColorgreenColor];_ecgView.lowerLimit=-10.0f;_ecgView.upperLimit=10.0f;[self.viewaddSubview:_ecgView];[NSTimerscheduledTimerWith

ios - Coreplot iOS 中 x 轴和 y 轴上的动态数据

如何在CoreplotiOS中的x轴/y轴中获取动态数据:目前在这里使用演示代码:在每一列下方,我需要在x轴上显示年份,它本身是动态的,y轴收入金额。我如何动态地做那个?////CPDStockPriceStore.m//CorePlotDemo////NB:PricedataobtainedfromYahoo!Finance://http://finance.yahoo.com/q/hp?s=AAPL//http://finance.yahoo.com/q/hp?s=GOOG//http://finance.yahoo.com/q/hp?s=MSFT////CreatedbyStev

ios - 使用 Core Graphics 和 Core Animations 创建包含圆圈的动画

我正在尝试一段时间,但没有成功。我用我想要的动画制作了一些圆圈。它从半径23到半径7进行动画处理。有一段代码工作正常,但里面没有透明圆圈。我需要帮助才能让这个“透明内圈”在动画期间正常工作。一些CustomLayer:@dynamiccircleRadius;//LinkedposttellsustoletCAimplementouraccessorsforus.//Whetherthisisnecessaryornotisuncleartomeandone//commenteronthelinkedpostclaimssuccessonlywhenusing//@synthesize

iphone - 卡在 IBOutlet 文件中

所以,我正在学习这本Xcode教程:Iphone和Ipad游戏开发傻瓜书。这是一本好书,但到处都有一些瑕疵。大多数时候我都能找到解决这些缺陷的方法,但现在我偶然发现了一些我无法修复的东西。甚至他们的网站或联系人也不知道答案。我正在尝试用汽车和其他东西制作游戏。但问题出在主菜单上。我已经用自定义按钮模式制作了按钮。并使用IbActions使它们工作(实际上,“新游戏”是现在唯一可用的按钮,因为它的功能已经编写好了)。但现在我必须让IBOutlets给他们一个动画。这本书告诉我使用QuartzCore.framework。现在的问题是,当我尝试构建它时出现此错误:在界面中找不到属性“new

iphone - 如何在 ios sdk 中增加和减少带有动画的图像 alpha 值?

在此代码中,我使用了动画。但有时我还需要更改图像的alpha值。-(void)animation{CGPointpoint=CGPointMake(imgView.frame.origin.x,imgView.frame.origin.y);imgView.layer.position=point;CABasicAnimation*anim=[CABasicAnimationanimationWithKeyPath:@"position.x"];anim.fromValue=[NSValuevalueWithCGPoint:point];anim.toValue=[NSValueval

ios - NSNumber numberWithFloat 与 Init 和 alloc

我有这行代码,我想弄清楚我编写它的方式的优缺点。我只是想将标签设置为浮点值并且两者都有效......只是不知道哪个更好......self.display.text=[[NSNumbernumberWithFloat:32.445]stringValue];有什么区别吗NSNumber*number=[[NSNumberalloc]initWithFloat:32.445];self.display.text=[numberstringValue];嗯-我知道肯定有区别-只是不确定会是什么。似乎第一个更像是一个包装器(如果这有意义的话)?谢谢!!! 最佳答案

ios - GMSMarker 不透明度动画不重复

我正在尝试使带有自定义图标的GMSMarker以衰减的动画不透明度闪烁。动画应该自己重复几次,但它没有,它只执行一次转换然后就停止了。这仅在为不透明度属性设置动画时发生,在为其他属性设置动画时效果很好。代码如下:GMSMarkerLayer*layer=marker.layer;CABasicAnimation*blink=[CABasicAnimationanimationWithKeyPath:@"opacity"];blink.fromValue=[NSNumbernumberWithFloat:0.0];blink.toValue=[NSNumbernumberWithFloa

ios - iOS 7.0 中的水平 CAGradientLayer

在我的应用程序中,我使用CAGradientLayer以这种方式设置我的单元格的背景:retValue=[tableViewdequeueReusableCellWithIdentifier:@"Cells"forIndexPath:indexPath];UIView*bgColorView=[[UIViewalloc]init];bgColorView.backgroundColor=[UIColorblueColor];bgColorView.layer.masksToBounds=YES;idstartColor=(id)[[UIColorcolorWithWhite:0.75a

ios - iOS 7.0 中的水平 CAGradientLayer

在我的应用程序中,我使用CAGradientLayer以这种方式设置我的单元格的背景:retValue=[tableViewdequeueReusableCellWithIdentifier:@"Cells"forIndexPath:indexPath];UIView*bgColorView=[[UIViewalloc]init];bgColorView.backgroundColor=[UIColorblueColor];bgColorView.layer.masksToBounds=YES;idstartColor=(id)[[UIColorcolorWithWhite:0.75a