我正在使用UIImage,我有一个Image,我想知道图像的名称.
我在我的应用程序中使用了sqlite数据库.我想将这个数据库与我的mysql服务器同步.但我认为在我的应用程序中用新数据库替换现有的数据库是很容易的.所以,它也将解决数据导入导出问题.但是我不要不知道如何从我的网址下载.sqlite文件并将其添加到我的应用程序包中.
以简单的方式.我想在运行时在Xcode Resource文件夹中添加文件.我不知道怎么做.如果有人有想法,请帮助我.
提前致谢.
在Identity Inspector下我们都知道label属性用于在界面构建器中更容易地识别对象,但是用于底部的颜色是什么?我尝试选择一种颜色但在界面构建器中没有任何改变.
编辑:截图:

有没有什么办法可以在Xcode中以编程方式检查互联网连接速度或带宽.我正在尝试这样做,因为连接速度慢会导致某些图片上传出现问题.
我正在研究地图视图应用程序.我想知道我们如何识别坐标位于我当前区域(与屏幕绑定的地图区域)或其外部.
提前致谢.
我正在使用NSOPerationqueue开发应用程序.它显示我在队列中添加OperationBlock时泄漏,如下图所示.请帮我找出泄漏分辨率.如果您需要更多屏幕截图或细节请告诉我.
您还可以在图像中查看我的代码.



我正在开发一个小应用程序,其中我有多个NSURLConnection.I已创建NSURL连接但我不知道如何处理它.我的代码如下所示.
-(void) loadTrafficAndEvent {
int a=10;
//Get the map view bounds for fetch the travel time markers from web service
MKCoordinateRegion region = mapView.region;
float print = region.center.latitude;
// NSLog(@"region.center=%g",print);
CGPoint firstcorner = CGPointMake(self.mapView.bounds.origin.x , mapView.bounds.origin.y);
CGPoint secondcorner = CGPointMake((self.mapView.bounds.origin.x+mapView.bounds.size.width) , mapView.bounds.origin.y);
CGPoint thirdcorner = CGPointMake(self.mapView.bounds.origin.x , (mapView.bounds.origin.y+ mapView.bounds.size.height));
CGPoint fourthcorner = CGPointMake((self.mapView.bounds.origin.x+mapView.bounds.size.width), (mapView.bounds.origin.y + mapView.bounds.size.height));;
//Then transform those point into lat,lng values
CLLocationCoordinate2D mapfirstcorner,mapsecondcorner,mapthirdcorner,mapfourthcorner,requestsender;
mapfirstcorner = [mapView convertPoint:firstcorner toCoordinateFromView:mapView];
mapsecondcorner = [mapView convertPoint:secondcorner toCoordinateFromView:mapView];
mapthirdcorner = [mapView convertPoint:thirdcorner toCoordinateFromView:mapView]; …Run Code Online (Sandbox Code Playgroud) 大家好,我正在开发地图视图基础应用程序。我几乎用地图视图完成了所有事情,但我无法比较两个不同的地图视图区域并找到地图视图的新区域。例如,如果用户拖动地图,我想找出该区域发生了多少变化。
我正在制作一个应用程序,其中我有一个视图,我正在显示朋友的详细信息.所以,如果我需要改变细节.我将不得不检查标签来改变它.在这里,我为每个标签设置了标签值.
如果用户按下标签,则新文本字段将显示在视图上,用户可以更改详细信息.
所以对于这个我写的触摸开始方法,我正在检查触摸值...但每当我触摸任何标签我得到视图的标签值为零,因为我应该得到标签上的标签值我点击了.
我的代码如下所示......
txtTmp = [[UITextField alloc] init];
//txtTmp is the textfield which should appear as super view of the label where i have clicked
txtTmp.delegate=self;
self.lblName.tag=11;
UITouch *touch = [touches anyObject];
Run Code Online (Sandbox Code Playgroud)
//这里即使我启用了用户交互,我也会将标记值设为0 ...
NSLog(@"view.tag = %d",touch.view.tag);
if(touch.view.tag==11) {
[txtTmp setFrame:CGRectMake(162, 43, 138, 50)];
txtTmp.text=lblName.text;
[self.view addSubview:txtTmp];
[txtTmp becomeFirstResponder];
temp=1;
}
Run Code Online (Sandbox Code Playgroud)
如果你对我的问题有任何疑问......请回复我......
谢谢,
嗨,我得到了这个代码,当我点击按钮时,很多事情发生了,图像设置等等.但我也希望它比较2个标签,当它们相等时我希望它改变视图.它不起作用有人看看为什么?
-(IBAction)play {
if (labelsText.text == textview.text){
GoedwoordViewController *Goedwoord = [[GoedwoordViewController alloc] initWithNibName:nil bundle:nil];
[self presentModalViewController:Goedwoord animated:YES];
}
Run Code Online (Sandbox Code Playgroud)
labelsText是我的输入标签,textview是一个标签,其中会出现一个随机单词.
GoedwoordViewController是目标视图.和GameViewController是当前视图.
希望有人知道
我开发了我的应用程序Xcode 4.1和iOS SDK版本(基本SDK版本)是 iOS 4.3这样,这个应用程序将在iPhone上运行iOS 5和/ iOS 6或不运行?
我认为应用程序可以在更高版本的操作系统上运行Deployment Target.这是正确的吗?我感谢任何帮助.
我有一个UIView,它是UINavigationController
Ex 的子视图.
- (void) ViewDidload{
UIView *theSubView = [[UIView alloc] init];
UIButton *button = [UIButton . . . .]
. . . .
[theSubView addSubView:button];
[self.view addSubview:theSubView];
}
Run Code Online (Sandbox Code Playgroud)
我放在"theSubView"里面的所有标签和按钮都显示出来,但它们对任何触摸都没有反应.
该UIButton还不是"theSubView"的子视图,如果它的工作原理,但是当它是自我的子视图它的工作原理.
所以我的问题是如何在"TheSubView"(UIView)工作中制作Button?它没有点亮或任何东西.
我想通过良好的算法在飞行中连续分配 3 个座位,同时预订一些座位。
基本上我想找到没有可能的 3 个连续免费座位来预订?
我试图通过贪婪的方式检查连续 3 个未预订的座位,然后计算座位总数以分配 3 个连续座位。