小编Luc*_*rdo的帖子

XCode 5 GM链接器错误:在体系结构i386的函数中有太多紧凑的展开信息

我们刚刚更新到XCode 5 GM,并且在DP 5下构建正常的项目(仅针对iOS 7的iPhone)现在提供错误:

ld: in /Users/dan/Documents/Projects/ImageProApp/Pods/SparkInspector/SparkInspector.framework/SparkInspector(ExplorerViewState.o), too many compact unwind infos in function anon for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Run Code Online (Sandbox Code Playgroud)

我们使用CocoaPods包含几个组件,CocoaAsyncSocket,CocoaLumberack,Spark Inspector和Reachability.我的猜测是我们要删除Spark Inspector,这个错误只会引用另一个组件.

任何人都可以推荐修复?告诉我使用非紧凑的展开信息的编译器/链接器标志是什么?

谢谢,

xcode linker objective-c ios

32
推荐指数
3
解决办法
1万
查看次数

在ios7中,UITableViewCellAccessoryDe​​tailDisclosureButton分为两个不同的附件按钮

ios7 UITableViewCellAccessoryDe​​tailDisclosureButton ios6 UITableViewCellAccessoryDe​​tailDisclosureButton

复选标记表示当时选定的行,左图像是iOS7模拟器,右图是iOS6模拟器.

关注的UITableViewCellAccessoryDetailDisclosureButton in iOS7 has two parts, one part with right arrow accessory and other is the clickable "i" button rather than iOS6. 是它是标准行为还是我做错了什么,如果它是标准的那么应该是什么应该是在iOS7中处理UITableViewCellAccessoryDe​​tailDisclosureButton的正确方法?

uitableview ios ios7

10
推荐指数
2
解决办法
9593
查看次数

无序修改和访问参数

我正在使用开源项目(NSBKeyframeAnimation)来处理我的项目中的一些动画.以下是我正在使用的方法示例:

double NSBKeyframeAnimationFunctionEaseInQuad(double t,double b, double c, double d)
{
    return c*(t/=d)*t + b;
}
Run Code Online (Sandbox Code Playgroud)

我已将我的Xcode更新为5.0,此项目中的每个方法都开始向我显示如下警告:"无序修改并访问't'".我应该将所有方法重写为objective-c还是有另一种方法可以摆脱所有这些警告?

iphone objective-c ipad ios

8
推荐指数
2
解决办法
5811
查看次数

更改标记图标的描边颜色

我将图标用于 Google Maps Marker (V3),如下所示:

var marker = new google.maps.Marker({
    id: "theId",
    icon: {
        path: google.maps.SymbolPath.FORWARD_CLOSED_ARROW,
        strokeColor: "green"
    },
    map: map,
    title: "theTitle",
    position: someLatitudeLongitude
});
Run Code Online (Sandbox Code Playgroud)

创建此标记后,我喜欢使用颜色面板更改颜色运行时。现在这对于折线或多边形非常适用,但对于标记不太好:它已更改但未实时更新。

代码:

selectedShape.icon.strokeColor = color; 
Run Code Online (Sandbox Code Playgroud)

问题:在地图上不显示颜色变化。只有在保存并重新加载地图后,才会显示正确的颜色。

对于我使用的多边形:

selectedShape.set('strokeColor', color);
Run Code Online (Sandbox Code Playgroud)

这工作正常。

那么标记或部分刷新是否有类似操作符的集合?

谢谢你的帮助。

此致,

埃弗特·维森内克

google-maps google-maps-api-3

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

使用Jquery Ajax将html字符串传递给服务器端

我在这个网站上看到很多答案对我有很大的帮助但是在这个问题上我需要请大家帮助我.

我有一个textarea作为Html编辑器将html内容传递给服务器并将其附加到新创建的Html页面(用于用户POST等),但jquery或ASP.NET不接受jquery通过数据传递的Html内容: {}

- 对于Jquery:

  $("#btnC").click(function (e) {
    e.preventDefault();

    //get the content of the div box 
    var HTML = $("#t").val();

    $.ajax({ url: "EditingTextarea.aspx/GetValue",
        type: "POST",
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        data: '{num: "' + HTML + '"}', // pass that text to the server as a correct JSON String
        success: function (msg) { alert(msg.d); },
        error: function (type) { alert("ERROR!!" + type.responseText); }

    });
Run Code Online (Sandbox Code Playgroud)

和服务器端ASP.NET:

[WebMethod]
public static string GetValue(string num)
{ 
    StreamWriter sw = new StreamWriter("C://HTMLTemplate1.html", true);
    sw.WriteLine(num);
    sw.Close(); …
Run Code Online (Sandbox Code Playgroud)

c# asp.net ajax jquery

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

GetItem(int)返回FragmentPagerAdapter中的Listfragment

我正在开发一个由3个List片段组成的Android应用程序.我正在使用一个ViewPager对象让用户在片段之间滑动.我在片段中使用了相同的代码.但是当我改变它以使用列表片段时,我收到了一个错误

the return type is incompatible with FragmentPagerAdapter.getItem(int)
Run Code Online (Sandbox Code Playgroud)

我被困在这里几个小时.请帮忙..

我的片段活动

public class PageViewActivity extends FragmentActivity {
MyPageAdapter pageAdapter;
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_page_view);

    List<ListFragment> fragments = getFragments();

    pageAdapter = new MyPageAdapter(getSupportFragmentManager(), fragments);

    ViewPager pager = (ViewPager)findViewById(R.id.viewpager);
    pager.setAdapter(pageAdapter);

}

private List<ListFragment> getFragments(){
    List<ListFragment> fList = new ArrayList<ListFragment>();

    fList.add(AllMsgFragment.newInstance("Fragment 1"));
    fList.add(ErrorMsgFragment.newInstance("Fragment 2"));
    fList.add(SuccessMsgFragment.newInstance("Fragment 3"));

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

和我的FragmentPageAdapter

class MyPageAdapter extends FragmentPagerAdapter {
private List<ListFragment> fragments;

public MyPageAdapter(FragmentManager fm, List<ListFragment> fragments) {
    super(fm);
    this.fragments = fragments;
} …
Run Code Online (Sandbox Code Playgroud)

android android-fragments fragmentpageradapter android-listfragment

3
推荐指数
1
解决办法
3791
查看次数

iOS任何大小的本地存储限制

我们正在开发一个内部应用程序,可以访问大量我们希望离线的图像数据.

简而言之,首次启动时,应用程序将从服务器(大约3Gb)下拉数据,然后仅在用户请求更新时再次获取数据.我只想知道持久本地存储是否有任何大小限制?

再次注意,这是一个内部应用程序,大约100个用户,他们靠近WiFi服务器,所有设备都是iOS6,视网膜(基本上是新的).这些更新一年只会发生几次,我们甚至可能会对其进行编码,因此只会下载更改.

storage cocoa-touch ios

3
推荐指数
1
解决办法
2116
查看次数

滑动和平移手势重叠

是否可以让特定手势失败,以便识别下一个可能的手势?

更具体一点,请查看示例代码段:

UISwipeGestureRecognizer *swipeLeft = [initialize UISwipeGestureRecognizer... @selector(handleSwipe:)]

swipeLeft = UISwipeGestureRecognizerDirectionLeft;

swipeLeft.delegate = self;

UIPanGestureRecognizer *pan = [initialize UIPanGestureRecognizer... @selector(handlePan:)]

pan.delegate = self;

[pan requireGestureRecognizerToFail:swipeLeft];
Run Code Online (Sandbox Code Playgroud)

上面的代码指出,如果设备无法识别向左滑动,则将使用平移手势处理程序.

所以我的问题:是否有可能让swipeLeft故意失败(在被设备识别为滑动左触摸之后)基于在handleSwipe上检查的一些标准,并让平移手势处理触摸输入?

谢谢.

gestures ios

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

NSMutableData - 发送到实例的无法识别的选择器

我试图从响应中获取数据.
我正在使用NSURLConnectionDelegate,NSURLConnectionDataDelegate.
该项目使用ARC.

@interface MainMenu()

@property (nonatomic, unsafe_unretained) NSMutableData* wpData;

@end 


@implementation

-(void)sendRequest{

    NSURL* url = [[NSURL alloc] initWithString:@"http://smthing"];

    NSMutableURLRequest* request = [[NSMutableURLRequest alloc] init];


    NSString* reqBody = @"Block";

    NSData* reqData = [reqBody dataUsingEncoding:NSUTF8StringEncoding];

    [request setURL:url];
    [request setHTTPBody:reqData];
    [request setHTTPMethod:@"POST"];

    self.wpData = [NSMutableData data];
    NSURLConnection* conection = [[NSURLConnection alloc] initWithRequest:request delegate:self];

    [conection start];
}

-(void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response {

//Here iI have [__NSMallocBlock__ appendData:]: unrecognized selector sent to instance 0x95f3fb0
        [self.wpData setLength:0];


}

@end
Run Code Online (Sandbox Code Playgroud)

也许你可以找到我的错误

谢谢 …

objective-c nsmutabledata ios unrecognized-selector

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