草庐IT

containers-from-scratch

全部标签

objective-c - 核心剧情: How to present popover from a bar selected by the user

我想完成什么我正在使用CorePlot(1.1)绘制条形图,我想在用户选择(点击)的条形下方显示一个包含更多详细信息的弹出窗口。代码我的代码是这样的:-(void)barPlot:(CPTBarPlot*)plotbarWasSelectedAtRecordIndex:(NSUInteger)idx{NSNumber*yValue=self.values[idx];NSLog(@"barWasSelectedAtRecordIndexx:%i,y:%@",idx,yValue);NSDecimalplotPoint[2];NSNumber*plotXvalue=[selfnumberF

ios - objective-C : Scratch and Reveal the Image Behind

我不知道这个的正确标题是什么,但这有点像划痕和揭示的东西。这就是它的样子。我必须重叠UIImageViews,现在我想做的是删除触摸点显示后面图像的View的特定部分。它类似于触摸绘图,但它的作用是删除某些点而不是在其上绘图。我尝试在网上搜索,但找不到任何内容。有人有想法吗? 最佳答案 github上有一个很棒的控件,它是MIT许可的。可能会帮助您获得一些想法,https://github.com/akopanev/iOS-Scratch-n-See祝你好运! 关于ios-objecti

ios - 如何修复警告 : Incompatible pointer types assigning to 'NSMutableString *' from 'NSString *'

我有这行代码给我一个警告:result=[resultsubstringToIndex:[resultlength]-1];警告是:Incompatiblepointertypesassigningto'NSMutableString*'from'NSString*'我想我明白问题出在哪里(我对子字符串的使用返回NSString?)-我只是不知道如何解决它。谁能赐教一下? 最佳答案 result=[[resultsubstringToIndex:[resultlength]-1]mutableCopy]假设结果属于NSMutable

iOS 代码 : How to load a value from a user-defined setting from build settings at run time

我在代码中有以下常量:staticNSString*constMyUrl=@"www.myurl.com";是否有可能创建一个用户定义的设置并分配一个可以在运行时或存档期间替换MyUrlconst值的值?我的情况如下:我有一个包含各种目标的项目。每个目标都指向代码中的不同URL。如果我可以通过用户定义的设置来管理URL而不是每次更改目标时都必须更改代码,那就太好了。 最佳答案 考虑使用info.plist来存储此类值。 关于iOS代码:Howtoloadavaluefromauser-d

ios - Xcode 5 与 iOS 7 : 'Story Board: There are unexpected subviews in the container view.' 中的 NSInternalInconsistencyException

我刚刚安装了带有OSXMavericks的Xcode5.0.2。在Xcode4.5上运行最初为iOS5.1构建的项目时,出现“NSInternalInconsistencyException”错误,如下所示:***Assertionfailurein-[UIStoryboardEmbedSegueperform],/SourceCache/UIKit_Sim/UIKit-2903.23/UIStoryboardEmbedSegue.m:19***Terminatingappduetouncaughtexception'NSInternalInconsistencyException',

iphone - 核心数据错误 : _Unwind_Resume called from function _PFFaultHandlerLookupRow in image CoreData

我从CoreDate收到这个奇怪的错误,我不明白为什么。当我删除UITableView的一行时,将执行下面的代码。我将一个字符串和一个对象传递给下面的方法,它在具有该字符串和该对象的外键的数据库表中获取文章。然后我删除该对象并重新加载表。-(void)deleteFavorite:(NSString*)linkinFolder:(Favorites*)f{NSFetchRequest*request=[[NSFetchRequestalloc]init];NSEntityDescription*favsDecriptor=[NSEntityDescriptionentityForNam

ios - NSURL :initWithString fails for string obtained from NSSearchPathForDirectoriesInDomains

有人能告诉我为什么这段代码会失败吗?调用initWithString后url为nil。正在成功填充变量documentsDirectory。NSArray*paths=NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,YES);NSString*documentsDirectory=[pathslastObject];NSURL*url=[[NSURLalloc]initWithString:documentsDirectory];谢谢 最佳答案

ios - Flash Air iOS 开发 : Is it possible to launch a browser from within your applications?

我使用FlashAir开发iOS游戏。能够从您的应用程序中启动浏览器会很好。任何想法将不胜感激!! 最佳答案 您可以使用StageWebView在您的AIR应用程序中打开网页。这是在屏幕右半边(又名舞台)打开页面的示例用法:privatevar_web_view:StageWebView;privatefunctioninit_stagewebview(url:String):void{if(_web_view){thrownewError('init_stagewebview()calledwithexisting_web_vie

iphone - Objective-C : How to grab a number after a sub string from string

我有一个很长的字符串如下PleaseplantoattendtoprovideupgradetoexistingcodemorningmeetingtoacoomdatebumteammembersMeetingNumber:457231123Tojointhismeetinggotohttp://domainname.comenterpassword现在我想在文本“session号”之后获取号码即457231123请帮忙。谢谢编辑假设我有一个字符串NSString*myString=@"Pleaseplantoattendtoprovideupgradetoexistingcodem

ios - fontWithSize(字体大小 : CGFloat) is available from which ios Version

我使用此函数更改UIButton中标签的字体大小。像这样(SWIFT):-Button!.titleLabel?.font=Button!.titleLabel?.font.fontWithSize(12)我想看看这个功能在ios7上的可用性。所以我看到了Xcode的快速帮助文档。它被称为iOS(8.0及更高版本)然后我继续在苹果网站上搜索适当的功能,但那里写着它可以从在iOS2.0和更高版本中可用。参见Here供引用。请让我知道该信任哪个。我看到了答案,但我不满意,因为我检查了其他类(class)就像NSMutableAttributedString用于swift这里写的是iOS(3