enabled ios
2018-09-20 17:39:00 weixin_34288121 阅读数 147
NS_CLASS_AVAILABLE_IOS(2_0) @interface UIControl : UIView
@property(nonatomic,getter=isEnabled) BOOL enabled;                                 
 // default is YES. if NO, ignores touch events and subclasses may draw differently

Enabled 是UIControl的属性,父类是UIView,这个属性会对控件的视觉有影响 ,当为NO时 控件默认显示灰色,触摸事件会被忽略,通常是禁用控制的首选

NS_CLASS_AVAILABLE_IOS(2_0) @interface UIView : UIResponder
@property(nonatomic,getter=isUserInteractionEnabled) BOOL userInteractionEnabled;  
// default is YES. if set to NO, user events (touch, keys) are ignored and removed from the event queue.

UserInteractionEnabled是UIView的属性,父类是UIResponder,触摸事件会被忽略并且会从响应链(响应队列)中移除

总结:如果控件有enabled 属性那就优先使用,因为它更直观,没有在使用UserInteractionEnabled

2017-03-31 12:19:58 sinat_15735647 阅读数 241

Step 1: Enable bitcode in build setting

bitcodeenable.png

Step 2: Add “-fembed-bitcode” flag to
- Other C flags
- Other C++ flags
- Other linker flags

bitcode-flag.png

Step 3: Check if framework bitcode enable use otool and grep:
- otool -l binary_name | grep __LLVM

Relate:
http://stackoverflow.com/questions/32868297/compiling-ios-library-with-bitcode-enabled/43110602#43110602

2019-02-01 03:53:35 weixin_33800593 阅读数 2

Step 1: Enable bitcode in build setting

Step 2: Add "-fembed-bitcode" flag to - Other C flags - Other C++ flags - Other linker flags

Step 3: Check if framework bitcode enable use otool and grep: - otool -l binary_name | grep __LLVM

Relate: stackoverflow.com/questions/3…

转载于:https://juejin.im/post/5c53c2a5f265da2daf79768f

2014-03-03 17:09:15 u011964791 阅读数 2571

用途:

做新手教程,周围较暗,然后高亮一个位置。

示例代码:

 
   CCLayerColor *player = CCLayerColor::create(ccc4(0, 0, 0, 110));
   
    CCClippingNode *pclip = CCClippingNode::create();
    pclip->setInverted(true);
    layer->addChild(pclip);
    pclip->addChild(player);
   
    static ccColor4F red = { 1, 0, 0, 1 };
    float radius = 55.0f;
    const int nCount = 200;
    const float angel = 2.0f * (float)M_PI / nCount;
    static CCPoint circle[nCount];
    for (int i = 0; i < nCount; i++) {
        float radian = i * angel;
        circle[i].x = radius * cosf(radian);
        circle[i].y = radius * sinf(radian);
    }
    CCDrawNode *pStencil = CCDrawNode::create();
    pStencil->drawPolygon(circle, nCount, red, 0, red);
    pStencil->setPosition(ccp(200, 200));
    pclip->setStencil(pStencil);



==========

当出现Stencil buffer is not enabled时,作如下修改即可

iOS:
AppController.mm
depthFormat: GL_DEPTH_COMPONENT16
==> depthFormat: GL_DEPTH24_STENCIL8_OES
EAGLView *__glView = [EAGLView viewWithFrame: [window bounds]
                                     pixelFormat: kEAGLColorFormatRGBA8
                                     depthFormat: GL_DEPTH24_STENCIL8_OES
                              preserveBackbuffer: NO
                                      sharegroup: nil
                                   multiSampling: NO
                                 numberOfSamples: 0 ];

Android:
Cocos2dxGLSurfaceView.java
public Cocos2dxGLSurfaceView(final Context context) {
          super(context);

          this.initView();


          this.setEGLConfigChooser(5, 6, 5, 0, 16, 8); // add this
 }
2015-11-13 11:09:50 vkooy 阅读数 251

今天把xcode升级到7.0了,除了swift语法的一些问题,还有几个问题比较麻烦,其中一个就是包含标题的一个错误提示。

开发环境:Xcode 7.0 
开发语言:swift(引入了第三方的oc库) 
出现场景:

正常调试是没有问题的,但是在Archive的时候,报出了这个错误。

问题详情:

(null): URGENT: all bitcode will be dropped because ‘xxxx’ was built without bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. Note: This will be an error in the future.

问题分析:

从上述的错误中应该可以看出,这是因为一个第三方的库不兼容,我的工程中开启了 ENABLE_BITCODE (应该是升级之后自动转换的),而这个第三方的库在编译的时候没有 enable bitcode,所以导致上诉问题。

解决方法:

应该是有两种吧,一种就是换成 enable bitcode 的第三方库,再有一种就是将工程的 ENABLE_BITCODE 设置为 false 就可以了。

因为我这里不太方便换库,所以,就把工程的设置给改了一下。

具体操作方法如下:

操作方法

上面解决方法是把工程的设置给改了,但是改了之后有什么影响现在还没有发现。如果以后发现了会更新本文。

没有更多推荐了,返回首页