草庐IT

iphone-se

全部标签

iphone - 在 App Purchase 中不适用于 iPhone 5 设备

我已经在我的应用中实现了应用内购买。它在iPhone4设备上运行良好,适用于iOS5和iOS6,但不适用于iPhone5设备。对于iPhone5,当我点击In-AppPurchase时,会弹出购买产品的提示,但不会要求输入用户ID和密码。知道哪个是问题所在吗?任何帮助将不胜感激。谢谢.. 最佳答案 在iPhone5中,如果您已经使用测试用户帐户登录了iTunes帐户,那么它不会询问密码。要禁用此功能:设置->通用->限制并将“需要密码”设置为“立即”,它会要求您输入密码。这可能有帮助,如果没有,请告诉我。谢谢,河芒。

iphone - Cocos2D-X游戏中的Chartboost

我用了chartboostcocos2d-x游戏中的sdk,我可以在appDelegate.m中使用以下代码并且效果很好......但是没有c++调用图表提升。如何从C++文件调用showInterstitialAPI?#defineCHARTBOOST_APP_ID=@"Hereaddedvalidappidfromchartboostaccount"#defineCHARTBOOST_APP_SIGNATURE@"Hereaddedvalidsignaturefromchartboost"Chartboost*cb=[ChartboostsharedChartboost];cb.a

iphone - 小时分钟秒到秒ios

我想在ios中将时间小时分秒转换为秒。有没有内置的方法?我怎样才能做到这一点?NSCalendar*gregorianCalendar=[[NSCalendaralloc]initWithCalendarIdentifier:NSGregorianCalendar];NSDateComponents*componentsDiff=[gregorianCalendarcomponents:NSHourCalendarUnitfromDate:[NSDatedate]]; 最佳答案 以下代码将日期作为字符串插入,然后返回秒数。-(NSN

iphone - CLGeocoder reverseGeocodeLocation "kCLErrorDomain error 2"

我正在开发具有反向地理编码功能的iOS应用程序。当我第一次调用该函数时,一切都很好。第二次调用后(使用完成调用的Controller的新实例)出现“Domain=kCLErrorDomainCode=2”错误。这发生在模拟器和设备上。坐标有效。我的代码:CLGeocoder*geoCoder=[[CLGeocoderalloc]init];CLLocation*loc=[[CLLocationalloc]initWithLatitude:cityCoords.latitudelongitude:cityCoords.longitude];self.displayedCity=[[Sta

iphone - 在保持原始字符串大小写的同时替换 NSString 中出现的字符串

我有一些使用UIWebview显示的本地HTML和CSS。我想合并搜索命中突出显示。这是我的突出显示方法:-(void)highlightsSearchTerm:(NSString*)searchTerm{NSString*highlightedSearchTerm=[NSStringstringWithFormat:@"%@",searchTerm];NSString*highlightedArticle=[article.articleHTMLstringByReplacingOccurrencesOfString:searchTermwithString:highlightedS

iphone - 在 Storyboard iphone 中 ScrollView

我正在尝试使用Storyboard在应用程序中设置ScrollView。我已正确完成所有操作,但ScrollView不会在模拟器或iPhone上滚动。MoreViewController.h@property(nonatomic,retain)IBOutletUIScrollView*moreScroll;MoreViewController.m-(void)viewDidLoad{[moreScrollsetScrollEnabled:YES];[moreScrollsetContentSize:CGSizeMake(1220,354)];}我已将scrollView连接到文件所有者

iphone - 如何取消删除已删除的 UIImage?

我正在尝试在我的PanGesture中使用图像删除代码。我正在使用下面的代码:UIImage*image=[UIImageimageNamed:@"326d4fb72362a2e44659141cadfc4977.jpg"];holderView=[[UIViewalloc]initWithFrame:CGRectMake(0,0,320,235)];imgForeground=[[UIImageViewalloc]initWithFrame:[holderViewframe]];[imgForegroundsetImage:image];[holderViewaddSubview:i

iphone - NSMutableURLRequest 发送部分帖子正文

我正在使用NSMutableURLRequest将base64编码的图像作为发布请求的一部分发送到服务器。我作为帖子正文记录的内容和服务器收到的内容不是一回事。服务器似乎得到了一个截断的版本,就好像连接中途中止了一样。请看下面的代码:NSString*dataStr=[NSStringstringWithFormat:@"request_data=%@",reqStr];NSLog(@"datastris%@",dataStr);NSData*dataForUrl=[dataStrdataUsingEncoding:NSUTF8StringEncoding];NSLog(@"nsdat

iphone - 如何在 iPhone 的 UIWebview 上显示 html 字符串?

我正在制作一个应用程序,我在其中从Web服务获取HTML字符串。现在,当我在WebView上显示这些数据时,会遇到一些问题来显示数据,例如-我得到的来自网络服务的HTML字符串是<divalign=\"left\">Highlightsoflatestdeal<br></div>当我在WebView上显示这些数据时,输出是Highlightsoflatestdeal是红色的。但我想要红色的输出,如“最新交易的亮点”。那么您能否建议如何使用这些html标记以正确的格式显示数据。编辑:-当前代码:-[my_webviewloadHTMLString:my

iphone - 在没有导航 Controller 的情况下将 barButtonItems 添加到 UINavigationBar

我正在尝试向uiNavigationBar添加一些按钮,但它没有附加到导航Controller,我不希望它是。我试图在栏的左侧添加两个按钮,但我发现唯一允许这样做的代码示例涉及使用行self.navigationItem.leftBarButtonItems显然,我的UINavigationBar不是navigatinItem。这是我创建NavBar的方式...h@property(nonatomic,retain)UINavigationBar*navBar;.m_navBar=[[UINavigationBaralloc]init];[_navBarsetFrame:CGRectM