我通过组织者将应用程序提交到Apps商店时收到此警告.
该应用程序引用Payload/.app /:解码器中的非公共选择器
我知道如果我们在应用程序中使用任何第三方API,我们会收到此警告.我在应用程序中使用了SOCKETIO-ObjC库来实现聊天功能.还使用facebook iOS sdk进行fb实现.所以我没有得到确切原因导致此警告.请找到附带的ScreenShot以便更好地理解
我正在使用Twitter登录进入我的应用程序.但是当我点击Twitter按钮时,Twitter页面会打开,但是我收到以下错误:
WHOA那里!!! 此页面不再有效.看起来有人已经使用了您提供的令牌信息.请返回网站,将您发送到此页面或重试.这可能是一个诚实的错误.
-(void)twitterclick
{
SA_OAuthTwitterEngine *_engine = [[SA_OAuthTwitterEngine alloc] initOAuthWithDelegate:self]; engine.consumerKey=[[NSString alloc]init];
_engine.consumerSecret=[[NSString alloc]init];
_engine.consumerKey = @"App consumer key";
_engine.consumerSecret = @"App Consumer secret";
UIViewController *controller = [SA_OAuthTwitterController controllerToEnterCredentialsWithTwitterEngine: _engine delegate: self];
if (controller)
[self presentModalViewController:controller animated:YES];
}
Run Code Online (Sandbox Code Playgroud)
我怎么解决这个问题?
我已经为用户当前位置加载了自定义注释图像.我在后台每1秒后更新当前用户位置.
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
[self performSelectorOnMainThread:@selector(tempupdate) withObject:nil waitUntilDone:NO];
[pool release];
-(void)tempupdate
{
NSLog(@"callToLocationManager");
mylocationManager = [[CLLocationManager alloc]init];
NSLog(@"locationManagerM = %@",mylocationManager);
mylocationManager.delegate = self;
mylocationManager.desiredAccuracy = kCLLocationAccuracyBest;
mylocationManager.distanceFilter = 500;
[mylocationManager startUpdatingLocation];
}
Run Code Online (Sandbox Code Playgroud)
更新当前latutude和经度后,我使用以下代码刷新地图
MKCoordinateRegion region;
MKCoordinateSpan span;
span.latitudeDelta=0.002;
span.longitudeDelta=0.002;
CLLocationCoordinate2D location;
location.latitude=[lat doubleValue];
location.longitude=[longt doubleValue];
region.span=span;
region.center=location;
addAnnotation=[[AddressAnnotation alloc]initWithCoordinate:location];
addAnnotation.mTitle=@"You are here";
[self.mapView removeAnnotations:self.mapView.annotations];
[self.mapView addAnnotation:addAnnotation];
[self.mapView setRegion:region animated:TRUE];
[self.mapView regionThatFits:region];
Run Code Online (Sandbox Code Playgroud)
但每次自定义注释图像在添加到地图之前闪烁.如何避免这种闪烁效应?
我正在iphone sdk4.0上创建一个应用程序.在那里,确实没有调用更新位置方法.我在下面给出了我的代码.请帮助.谢谢.
-(id)init
{
[super init];
obj=[[UIApplication sharedApplication]delegate];
locationManager = [[CLLocationManager alloc] init];
locationManager.delegate = self;
//locationManager.distanceFilter = kCLDistanceFilterNone; // whenever we move
locationManager.desiredAccuracy = kCLLocationAccuracyHundredMeters; // 100 m
[locationManager startUpdatingLocation];
return self;
}
-(void)locationManager:(CLLocationManager *)manager
didUpdateToLocation:(CLLocation *)newLocation
fromLocation:(CLLocation *)oldLocation
{
NSLog(@"%f",newLocation.coordinate.latitude);
NSLog(@"%f",newLocation.coordinate.longitude);
obj=[[UIApplication sharedApplication]delegate];
location=[[CLLocation alloc]initWithLatitude:newLocation.coordinate.latitude longitude:newLocation.coordinate.longitude];
obj.lattitude1=[NSString stringWithFormat:@"%f",newLocation.coordinate.latitude];
obj.longitude1=[NSString stringWithFormat:@"%f",newLocation.coordinate.longitude];
//location=[[CLLocation alloc]initWithLatitude:39.9883 longitude:-75.262227];
}
Run Code Online (Sandbox Code Playgroud) 我有一个简单的UITableView有4行,每行高度为50.当我按第四行时,我使用UITableViewRowAnimationTop插入高度为80的第五行.到现在为止还挺好.
我想在再次按下第四行时删除第五行.但是当我使用UITableViewRowAnimationTop(或任何其他动画样式)删除行时,动画看起来很尴尬 - 动画开始但是在动画完成之前单元格突然消失.(这只有当您使用具有背景颜色的单元格时才会显现.您可以看到单元格的下半部分突然消失,而不是消失在其上方的单元格下方.)
代码是这样的:
[self.tableview beginupdates];
[self.tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationTop];
[self.tableview endupdates];
Run Code Online (Sandbox Code Playgroud)
行高由该tableView:heightForRowAtIndexPath:方法提供.
当所有行具有相同的高度,或者被删除的行比其他行短时,不会发生此问题.
我认为一个解决方法是在删除它之前将第五个单元格的高度更改为50,但我宁愿不这样做.请帮助
我想在我的iphone中跟踪一个人在mapview上的动作.我正在使用mapview显示用户的当前位置以及另一个表示另一个人位置的人说人AI想要跟踪人我的iphone mapview上的物理运动.这意味着如果人A从一个位置移动到另一个位置,则表示人A位置的图标或图钉应该在我的iphone上的mapview上从一个位置移动到另一个位置.我想在mapview上跟踪人物A现场动作.是否有可能?如果是,请说明如何?请帮忙.
在我的应用程序中我使用一个表.现在我想用替代颜色分隔两行.这意味着我的第一行将具有白色,我的第二行将具有灰色,第三行将再次具有白色...所以请任何人有解决方案.然后请分享.谢谢.
阿克沙伊
我想在iphone中集成XMLRPC.但是无法理解该怎么做?任何人都有自己的信息或教程或其他东西.
我的数据可视化应用程序在重绘期间会产生大量内存消耗峰值(setNeedsDisplay会触发drawRect).我目前正在重新绘制包含数据图的整个视图.此视图比设备显示大得多.
有没有办法告诉CoreGraphics分配足够的内存来绘制每个元素(每个元素都是一个比设备显示小得多的小矩形块)并在完成后释放内存,而不是我当前的天真方法?
提前致谢.
-Doug
更新12月8日美国东部时间上午8:28
以下是具有解释性词汇的相关代码.我正在运行使用ObjectAlloc,Memory Monitor和Leaks仪器运行的仪器.我唯一的内存泄漏是由于NSOperationQueue没有释放mems.这是次要的,不相关.
从结构上来说,该应用程序包含一个tableView,其中列出了人类基因组中需要检查的有趣位置.当选择表行时,我将数据收集操作排入队列,该操作返回名为alignmentData的数据.然后将该数据绘制为水平矩形板.
最初,当tableView启动时,我的内存占用量为5 MB.
- (void)viewWillAppear:(BOOL)animated {
// Initial dimensions for the alignment view are set here. These
// dimensions were roughed out in IB.
frame = self.alignmentView.frame;
frame.origin.x = 0.0;
frame.origin.y = 0.0;
frame.size.width = self.scrollView.contentSize.width;
frame.size.height = 2.0 * (self.containerView.frame.size.height);
}
Run Code Online (Sandbox Code Playgroud)
注意:在调用viewWillAppear:之后,内存占用空间没有变化.尽管alignmentView的尺寸远远超出了显示器的尺寸.
这是从数据收集操作调用的方法.
- (void)didFinishRetrievingAlignmentData:(NSDictionary *)results {
// Data retrieved from the data server via the data gathering operation
NSMutableData *alignmentData = [[results objectForKey:@"alignmentData"] retain];
NSMutableArray *alignments = [[NSMutableArray alloc] init];
while …Run Code Online (Sandbox Code Playgroud)