小编dan*_*ard的帖子

当我清理Xcode DerivedData时,我无法在iOS模拟器中运行我的应用程序

在Xcode 6.0.1中,我必须删除DerivedData中的所有数据,然后运行我的应用程序,它成功构建但我无法在iOS模拟器iPhone 5上运行它.Xcode警告:

Program/ProgramArguments无效或缺失

谁能帮我 ?

xcode simulator ios

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

在Cocos2d-x中加载Base64编码的图像

Cocos2d-x我试图加载base64编码的图像字符串来创建一个精灵.某处似乎有一个错误,因为bool ok总是返回false.也许有人可以帮助我吗?

这是我正在使用的代码:

std::string source = "data:image/png;base64,iVBORw0K....."

int len = 0;
unsigned char *buffer;

len = base64Decode((unsigned char*)source.c_str(), (unsigned int)source.length(), &buffer);

CCImage* img = new CCImage(); 
bool ok = img->initWithImageData(buffer,len);
Run Code Online (Sandbox Code Playgroud)

c++ iphone android ios cocos2d-x

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

局部变量默认是强还是弱?

假设我有局部变量(不是属性)Obj *x = d,d 的引用计数是否增加了?或者它是默认的弱引用?

objective-c ios automatic-ref-counting

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

如何滚动到ul的底部?

我使用PhoneGap开发了一个应用程序.在我的应用程序中,我使用了listview中的一些元素ui li.在这里,我想滚动到列表中的最后一个元素.为此,我使用了以下代码,

$('#dates li').last().addClass('active-li').focus();
$('#dates li').last().focus();
Run Code Online (Sandbox Code Playgroud)

我也用过这个,

$('#dates').scrollTop($('#dates li:nth-child(14)').position().top);;
Run Code Online (Sandbox Code Playgroud)

额外的课程正在增加,但焦点不起作用.

html javascript jquery jquery-ui cordova

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

可选外键其中一个必须是强制性的 - 如何?

我有一个表有两个可选的外键,每个表都有一个不同的表,其中一个是要填写的,但是哪一个并不重要.我正在考虑使用触发器来强制实施这种"约束",但这样做却感觉不对.我无法重新设计表格,因此我坚持使用它.

我们正在使用Oracle 10g

有一个更好的方法吗?

编辑:我不小心遗漏了一些信息.至少要填写一​​列HAS,并且只能填写一列.

oracle database-design foreign-keys oracle10g

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

CLLocationManager startMonitoringForRegion:设备重启后不重新启动应用程序

好的,所以我目前有一个应用程序,我在其中注册使用该CLLocationManager startMonitoringForRegion方法监控的地理围栏.当应用程序位于前台和后台时,此工作正常.

我也有适当的plist值设置:

UIBackgroundModes :{location}
UIRequiredDeviceCapabilities: {location-services}
Run Code Online (Sandbox Code Playgroud)

什么行不通

设备重启后,应用程序未重新启动.如果我startMonitoringSignificantLocationChanges在进入背景之前设置,我可以强制这种情况发生.但是这种方法使用了更多的电池寿命,而且我不需要这个位置,就在我打破地理围栏的时候.

各地区的文件说:

In iOS, the regions you register with the location manager persist between launches of your application. If a region crossing occurs while your iOS app is not running, the system automatically wakes it up (or relaunches it) in the background so that it can process the event. When relaunched, all of the regions you configured previously are made available in the monitoredRegions property of any location …

core-location cllocationmanager ios geofencing

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

修改activeadmin模块以隐藏面包屑

在链接的belongs_to上,Active Admin存在一些问题.除此之外,它会导致面包屑有时显示错误的链接.

我希望通过修改初始化程序中的活动管理面包屑帮助程序,找到一种简单地将面包屑隐藏在某些(但不是全部)页面上的方法.F ex:

module ActiveAdmin
 module ViewHelpers
  module BreadcrumbHelper


    def breadcrumb_links(path = request.path)
      if @hidebread 
        false
      else
        parts = path[1..-1].split('/') # remove leading "/" and split up the URL
        parts.pop                      # remove last since it's used as the page title

        parts.each_with_index.map do |part, index|
          # 1. try using `display_name` if we can locate a DB object
          # 2. try using the model name translation
          # 3. default to calling `titlecase` on the URL fragment
          if part =~ /\A(\d+|[a-f0-9]{24})\z/ && …
Run Code Online (Sandbox Code Playgroud)

ruby-on-rails activeadmin

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

错误:将代码从ios 5.x更新到6.0时,“范围{2147483647,1}超出了NSNotFound-1的最大索引值”

我正在尝试将我的应用程序从ios5.x更新到6.0。我的代码在ios 5.1.1中完美运行,但是当我在ios6.0中运行时出现错误

"Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[NSMutableIndexSet addIndexesInRange:]: Range {2147483647, 1} exceeds maximum index value of NSNotFound - 1'"

点击按钮。请提出任何解决方案

iphone objective-c ios5 ios6

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

使用树顶部的lldb和xcode

我在/ usr/local/bin中构建了lldb树的顶部,我想告诉xcode使用这个二进制文件而不是默认的二进制文件.但我找不到如何/在哪里设置这个.

xcode lldb

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