小编mm2*_*m24的帖子

将iOS应用预览分发给非开发人员(例如音乐家,插画家)

我想将App预览分发给我正在使用的音乐家.他不是我公司的员工,而是让我免费做游戏sountrack.

我已经检查了iOS Provisioning Portal并找到了以下dislcaimer:

"重要提示:如果您向员工,承包商和组织成员之外的任何其他人注册Apple开发人员并且明确需要知道或使用Apple软件,则可以终止您的iOS开发人员计划会员资格.为了代表您开发和测试应用程序.禁止未经授权分发Apple机密信息(包括预发布Apple软件),并可能使您承担民事和刑事责任."

根据这个,我只能分发预览应用程序来测试我以某种方式使用的开发人员.这不包括朋友在非编码问题上免费工作的情况(例如音乐家).

你们中有人有类似的担忧吗?

非常感谢你!

EDIT2: 我在新帖子上再次发布了这个问题,其中包含更多详细信息,因为Apple在这个问题上回复了我并提供了与下面不同的答案.我试图为这些答案添加评论,但这个问题似乎没有更多的可见性,需要快速解决这个问题,所以认为这是要走的路..让我知道这是不正确的.谢谢!

distribution ios

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

Cocos2d 2.0:何时是"清除"缓存的好习惯?

在每个场景的开头调用以下"清除"方法是一种好习惯吗?如果不是,我应该什么时候打电话给他们,是否有任何教程解释何时使用每个电话?我错过了什么吗?

    [CCTextureCache purgeSharedTextureCache];
    [CCSpriteFrameCache purgeSharedSpriteFrameCache];
    [CCAnimationCache purgeSharedAnimationCache];
    [CCShaderCache purgeSharedShaderCache];
    [[CCFileUtils sharedFileUtils] purgeCachedEntries];
Run Code Online (Sandbox Code Playgroud)

(我正在使用Cocos2d 2.0并启用了ARC,不要认为它是相关的,但仍然认为值得一提)

memory-management cocos2d-iphone ios automatic-ref-counting cctexturecache

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

了解applicationSignificantTimeChange:

我发现有时候我的应用程序(Cocos2d游戏)在经过一段时间的重大改变之后就会以"越野车"的方式进行.例如:

  • 案例1:当应用程序进入后台时,几分钟后,我重新启动它,我可以看到加载图像,然后应用程序/游戏恢复.
  • 案例2:当应用程序进入后台并在很长时间后更改时,应用程序有时会重新启动,有时不会.我仍然不清楚为什么.

看看我发现的AppDelegate方法:

// next delta time will be zero
-(void) applicationSignificantTimeChange:(UIApplication *)application
{
    [[CCDirector sharedDirector] setNextDeltaTimeZero:YES];
}
Run Code Online (Sandbox Code Playgroud)

我想知道,因为这影响了导演和导演影响了动画,这个电话和案例1和案例2之间是否有链接?

objective-c cocos2d-iphone uiapplication ios

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

逆向工程iOS天气应用UI组件

我正在尝试写下iOS天气App的摘要.我感兴趣的主要组件在下面的图像中标记为1,2,3,4和5.

在此输入图像描述

用户界面应如下获得:

一个ViewController:

  • 1 - 是UILabel
  • 2 - 是一个UIButton,可以更改文本或隐藏显示第二个按钮
  • 3 - 带水平滚动的UIScrollView?我猜它有自定义细胞类型.
  • 4 - 与上述相同但是垂直单元格.

还有一个PageView控制器(5).

故事板创建(想要遵循这个):

  • 1-4 - 属于同一个ViewController
  • 5 - 高于此层次结构.

释疑:

  • 我的解释是否正确?
  • 是3/4垂直视图控制器?
  • 使用界面/故事构建器实现这个有什么不利之处吗?

iphone user-interface uiscrollview ios

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

在WKWebView中填充输入文本字段

我已将以下html页面加载到由特定视图控制器控制的WKWebView中。加载视图,我希望该应用程序自动在页面中填充输入文本字段。

在此示例中,我希望应用程序在下面表单的“结果”文本字段中写入“ Hello Result”。

<html>
<head>
    <title>Test Page</title>
</head>
<body>
<form>
 QR Result <input type="text" name="Result" width="20">
</form>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)

这是我将HTML页面作为文件加载到视图控制器中的代码:

   var htmlFile = NSBundle.mainBundle().pathForResource("apptest", ofType: "html")
        var contents = NSString(contentsOfFile: htmlFile!, encoding: NSUTF8StringEncoding, error: nil)
        self.webView?.loadHTMLString(contents!, baseURL: nil)
Run Code Online (Sandbox Code Playgroud)

我如何加载视图(文件或URL)都没有关系。我想要做的是加载视图后的某个时候填充字段。

ios swift wkwebview

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

WKInterfaceTable的didSelectRowAtIndex永远不会在WKInterfaceController中被调用

我有一个WKInterfaceController,我添加了一个表如下:

// .h

@interface InterfaceController : WKInterfaceController
@property (weak, nonatomic) IBOutlet WKInterfaceTable *table;
@end

// .m
- (void)table:(WKInterfaceTable *)table didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    NSLog(@"did select");
}

- (void)table:(WKInterfaceTable *)table
didSelectRowAtIndex:(NSInteger)rowIndex{
    NSLog(@"did select new");
}
Run Code Online (Sandbox Code Playgroud)

但是这两种方法都没有被调用.我无法找到WKInterfaceTable的任何协议声明,也没有找到表上的任何委托属性.

这里有什么我想念的吗?

watchkit wkinterfacetable ios8.2 wkinterfacecontroller

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

如何访问UITouch locationInWindow坐标

我正在使用Cocos2D开发迷你iPhone游戏..我想检测精灵的触摸.为此,我决定不对CCSprite类进行子类化,而是使用图层类中的触摸事件:

-(void) ccTouchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
    CCLOG(@"touch began...");
    CCSprite *particularSprite = [self getChildByTag:artSprite];
    CCNode *nodeClass = (CCNode*) particularSprite;
    CGRect DesiredSprite = CGRectMake(nodeClass.positionInPixels.x,  nodeClass.positionInPixels.y,particularSprite.contentSize.width  , particularSprite.contentSize.height);

    for (UITouch *myTouch in touches) {
        CGPoint touchPosition = [myTouch locationInView: [myTouch view]];
        if(CGRectContainsPoint(DesiredSprite ,touchPosition ))
        {
            CCLOG(@"Sprite touched");
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

不幸的是坐标错了.locationInView以不同方式对其进行翻译.我正在使用landscapeleft视图(kCCDeviceOrientationLandscapeLeft).

在函数上添加一个断点并查看myTouch变量,然后我看到它有一个名为locationInWindow的成员变量,它反映了实际的触摸位置(这就是我想要的).

我试图访问locationInWindow,但没有getter方法.我怎么能这样做?

致以真诚的感谢和诚挚的问候

iphone sprite uiview cocos2d-iphone uitouch

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

属性和ARC

我正在使用ARC和Cocos2d 2.0作为静态库(它不使用ARC并编译为单独的目标).我翻译了一个旧项目(没有ARC),我想知道以这种方式声明属性是否存在一些潜在的保留周期问题:

@interface PlayerData : NSObject <NSCoding> {
}


//Is ok to save this as if the game gets paused you may want to save this.
@property (readwrite, nonatomic) int numberOfHits;
@property (readwrite, nonatomic) bool everBeenHitInCurrentLevel;
@property (readwrite, nonatomic) int hitsForOneHearth;
Run Code Online (Sandbox Code Playgroud)

我注意到我的各种场景随着时间的推移积累了记忆.我还在CCLayer方法的发布方法(MyScene:CCLayer)中添加了一个CCLOG调用,它永远不会被调用.这就是我创建场景的方式(我使用" [CCDirector sharedDirector] replaceScene "方法替换)

+ (id) sceneWithLevelName:(LevelName)name
{
    CCScene *scene = [CCScene node];        
    ShooterScene * shooterLayer = [[self alloc] initWithId:name];
    [scene addChild:shooterLayer];


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

编辑:当我意识到我愚蠢地没有包含对象的示例并且仅使用原始数据类型时,我将在此处粘贴一些元素片段:CharacterSelection,ShooterScene和PlanetSelectionMenu:

//ShooterScene
@interface ShooterScene : CCLayer {
    HudLayer * hudLayer;
    ....
} …
Run Code Online (Sandbox Code Playgroud)

objective-c cocos2d-iphone ios automatic-ref-counting

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

ZBar:架构armv7的未定义符号

我在iOS 8项目中使用zBar库,我得到了这些编译器警告:

Undefined symbols for architecture armv7:
  "_iconv", referenced from:
      _qr_code_data_list_extract_text in libzbar.a(qrdectxt.o)
  "_iconv_open", referenced from:
      _qr_code_data_list_extract_text in libzbar.a(qrdectxt.o)
  "_iconv_close", referenced from:
      _qr_code_data_list_extract_text in libzbar.a(qrdectxt.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Run Code Online (Sandbox Code Playgroud)

我遵循这个建议将框架按顺序排列,这就是我导入它们的方式:

在此输入图像描述

我假设库libzbar.a是为armv6处理器创建的,因为我用armv7瞄准iOS 8,它会发生冲突.有没有办法在不改变我的项目架构目标的情况下解决这个问题?

armv7 ios zbar-sdk zbar

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

OpenCV:如何检测特定颜色的线条?

我正在开发一个小型OpenCV项目,用于从手机摄像头中检测某种颜色的线条.

总之希望:

  1. 将输入图像转换为特定颜色的图像(例如,来自特定上下范围的红色)
  2. 将Hough线变换应用于生成的图像,以便仅检测该特定颜色的线条
  3. 在原始图像上叠加检测到的线条

这些是我想要使用的功能,但不能确定如何填补缺失的位.

这是在处理来自CvVideoCamera实例的图像时从智能手机应用程序调用的processImage函数

- (void)processImage:(Mat&)image;
{
cv::Mat orig_image = image.clone();

cv::Mat red_image = ?? 

// Apply houghes transformation to detect lines between a minimum length and a maximum length (I was thinking of using the CV_HOUGH_PROBABILISTIC method..)
// Comment.. see below..
Run Code Online (Sandbox Code Playgroud)

我无法理解这里文档,因为C++方法签名没有方法字段

vector<Vec2f> lines;
Run Code Online (Sandbox Code Playgroud)

从官方文档:

C++:void HoughLines(InputArray image,OutputArray lines,double rho,double theta,int threshold,double srn = 0,double stn = 0)

HoughLines(dst, lines, 1, CV_PI/180, 100, 0, 0 ); …
Run Code Online (Sandbox Code Playgroud)

c++ opencv feature-extraction hough-transform color-detection

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