小编Chr*_*zzz的帖子

问题与iphone sdk 4.2.1

可能是一个愚蠢的问题.在调试模式下在设备上运行我的项目时,我收到很多警告,其中包含以下字符串:

警告:无法读取/Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1(8C148a)/ Symbols/System/Library/PrivateFrameworks /的符号

我认为它是由于"4.2.1"和"(8C148a)"之间的空间.我怎么能摆脱它?它必须是Xcode中的某个设置.

我在模拟器上没有这些警告.

先谢谢基督徒

iphone xcode ios4

23
推荐指数
2
解决办法
3万
查看次数

在UITableview中选择多行

我想在UITableview中选择多行,就像Apple在原生Alarm应用程序中所做的那样(见图片) 替代文字

我怎样才能做到这一点?

到目前为止我看到的所有答案都是旧的(并且说"不能做")或者引用本机Mail应用程序中的多行选择.那个方法不是我想要的,因为你必须首先进入"编辑"模式.我希望能够立即选择行.

希望有人能提供帮助.

基督教

iphone uitableview

17
推荐指数
4
解决办法
2万
查看次数

当前位置包含自定义注释,标注和蓝色精度圆

经过2小时的谷歌搜索后,我找不到答案,所以这是我的最后一次拍摄.

我想在mkmapview上为用户当前位置使用自定义注释.但我也希望它周围有蓝色的精确度圈.

可以这样做吗?

如果没有,我可以用圆圈添加默认蓝点的标注吗?

我需要这个的原因是因为在我的应用程序中,当前位置点经常在其他注释下消失.这就是为什么我使用带有标注的紫色引脚作为当前位置的原因.

这是我的注释代码:

if ([annotation isKindOfClass:MKUserLocation.class]) 
    {
        MKPinAnnotationView *userAnnotationView = (MKPinAnnotationView *)[self.mapView dequeueReusableAnnotationViewWithIdentifier:@"UserLocation"];
        if (userAnnotationView == nil)  {
            userAnnotationView = [[[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:@"UserLocation"]autorelease];
        }            
        else 
            userAnnotationView.annotation = annotation;

        userAnnotationView.enabled = YES;
        userAnnotationView.animatesDrop = NO;
        userAnnotationView.pinColor = MKPinAnnotationColorPurple;
        userAnnotationView.canShowCallout = YES;
        [self performSelector:@selector(openCallout:) withObject:annotation afterDelay:0.01];

        return userAnnotationView;  
    }
Run Code Online (Sandbox Code Playgroud)

谢谢你的任何建议.干杯,基督徒

iphone mkmapview mkannotation

9
推荐指数
1
解决办法
3529
查看次数

achartengine x轴标签与值相比发生偏移

我注意到我的时间表的Xlabels与X值不同步.这些点应该在标签的正上方.在左侧它没关系,但它向右移动.我不知道如何解决这个问题我得到的:http: //tinypic.com/r/2uqj905/7 它应该如何:http: //www.achartengine.org/dimages/average_temperature.png 我试过了折线图或将日期转换为双精度但没有效果.任何帮助都会很好.

问候,基督徒

这是我的一些代码:

    XYMultipleSeriesRenderer renderer = buildRenderer(colors, styles);
    renderer.setPointSize(5.5f);
    renderer.setZoomEnabled(false, false);
    renderer.setMarginsColor(Color.parseColor("#00FF0000"));
    renderer.setAxisTitleTextSize(16);
    renderer.setYLabelsAlign(Align.RIGHT);
    renderer.setLabelsTextSize(15);
    renderer.setLegendTextSize(15);
    renderer.setMargins(new int[] { 10, 65, 18, 10 });

    int length = renderer.getSeriesRendererCount();
    for (int i = 0; i < length; i++) {
        XYSeriesRenderer seriesRenderer = (XYSeriesRenderer) renderer
                .getSeriesRendererAt(i);
        seriesRenderer.setFillPoints(true);
        seriesRenderer.setLineWidth(4.0f); // dikte van lijn
    }

    MinMax minMax = determineMinMax(targetSteps, samples);

    setChartSettings(renderer, context.getString(R.string.graph_title),
            dateLabelOnScreenType(type),
            context.getString(R.string.graph_y_axis), minMax.minX,
            minMax.maxX, minY, maxY, Color.WHITE,
            Color.BLACK);
    renderer.setXLabels(7);

    renderer.setYLabels(0);
    renderer.setDisplayChartValues(false);
    renderer.setShowGrid(true);
     renderer.setPanEnabled(false, false); …
Run Code Online (Sandbox Code Playgroud)

achartengine

9
推荐指数
1
解决办法
1947
查看次数

ARC错误:init方法必须返回与接收器类型相关的类型[4]

ARC下的这段代码有什么问题?我得到以上错误:

- (Moment *)initMoment:(BOOL)insert {

if (insert) {
    self.moment = [NSEntityDescription insertNewObjectForEntityForName:@"Moment" inManagedObjectContext:self.managedObjectContext];
  } else {
    self.moment = [NSEntityDescription insertNewObjectForEntityForName:@"Moment" inManagedObjectContext:nil];
  }
return self.moment;
}
Run Code Online (Sandbox Code Playgroud)

initialization ios automatic-ref-counting

8
推荐指数
1
解决办法
6611
查看次数

使用Google Maps V3的多条折线和信息窗口

我有一个包含多条折线的地图,并希望在点击该行时打开一个特定于行的信息窗口.

到目前为止,我的代码只显示了最后一次迭代的内容.

我找到了两个我想要的非常好的例子,但经过几个小时的尝试后,我仍然没有进一步.
示例1:http://srsz750.appspot.com/api3/polylines-multiple.html
示例2:http://www.geocodezip.com/v3_GenericMapBrowser.asp?filename = flights090414.xml

所以你是我的最后一击:-S

这是我的代码,只显示最后一次迭代的内容:

for (var i = 0; i < locations.length; i++) {
var route = locations[i]; // locations is an array of route-arrays.   
 //route is an array with details. route[0] contains the description.

var imageStart = 'img/rijder.png';   
var polyOptions = {
     strokeColor: '#0000FF',
         strokeOpacity: 1.0,
     strokeWeight: 3
    }       

  poly = new google.maps.Polyline(polyOptions, info);   
  var path = poly.getPath(); 

 //line text

 var info = route[0]; 
 google.maps.event.addListener(poly, 'click', function(event) { …
Run Code Online (Sandbox Code Playgroud)

google-maps polyline infowindow google-maps-api-3

5
推荐指数
1
解决办法
2万
查看次数

如何在iOS5和ARC上使用Twitter-OAuth-iPhone

我试图在使用ARC的iOS5应用程序中使用Ben Gottliebs Twitter-OAuth-iPhone.我已经用-fno-objc-arc标记了这些文件.但是现在我遇到了很多错误.我不知道从哪里开始.没有ARC,框架似乎工作得很好.任何帮助,将不胜感激.

编辑:这似乎与SecKeychainItemRef有关我在这里找不到答案:https://stackoverflow.com/questions/3675522/how-to-use-mgtwitterengine-for-iphone

twitter oauth ios5

2
推荐指数
1
解决办法
3532
查看次数

用JSP编写JSON

您可能会使用某些库自动执行此操作.但我是Java和JSON的新手,我需要快速解决.

我想要的是从JSP文件中写下(echo)JSON.到目前为止这么好,但现在我有一个对象列表.所以我开始快速枚举.

现在的问题是:如何用}]而不是关闭JSON数组,?通常我在和中放一个nill或null.

这是我的循环:

 "rides":[{  
<% 
List<Ride> rides = (List<Ride>)request.getAttribute("matchingRides");
            for (Ride ride : rides) { 
%>               
 "ride":{     
     "rideId":"<%= String.valueOf(ride.getId()) %>",
   "freeText":"<%= freeText %>" 
   },                      

     <% 
     }
     %>   
}  ]    
Run Code Online (Sandbox Code Playgroud)

javascript java arrays json list

0
推荐指数
1
解决办法
5149
查看次数