UIView为什么不能切圆角呢? 获取链接 Facebook X Pinterest 电子邮件 其他应用 九月 13, 2015 self.layer.cornerRadius = 5; 下面这句一定要加上 self.layer.masksToBounds = YES; 如果设置了borderWidth的话,会直接把masktobounds也直接变为yes。 同时,如果不希望父视图把子视图越界的部分显示出来,那么也需要设为yes。 获取链接 Facebook X Pinterest 电子邮件 其他应用 评论
使__attribute__((annotate("xxx")))能作用于OC函数 五月 08, 2018 diff -Naur orig/llvm-3.7.0.src/tools/clang/lib/CodeGen/CGBlocks.cpp llvm-3.7.0.src/tools/clang/lib/CodeGen/CGBlocks.cpp --- orig/llvm-3.7.0.src/tools /clang/lib/CodeGen/CGBlocks.cpp 2015-06-23 01:07:51.000000000 +0200 +++ llvm-3.7.0.src/tools/clang/lib/CodeGen/CGBlocks.cpp 2015-11-13 13:05:44.000000000 +0100 @@ -1157,6 +1157,10 @@ fnLLVMType, llvm::GlobalValue::InternalLinkage, name, &CGM.getModule()); CGM.SetInternalFunctionAttributes(blockDecl, fn, fnInfo); + // Emit annotation attributes for ObjC blocks. + if (blockDecl->hasAttr<AnnotateAttr>()) + CGM.AddGlobalAnnotations(blockDecl, fn); + // Begin generating the function. StartFunction(blockDecl, fnType->getReturnType(), fn, fnInfo, args, blockDecl->getLocation(), diff -Nau... 阅读全文
viewWillAppear不执行的解决办法 九月 14, 2015 UITableViewController或UIViewController中使() 后viewWillAppear:(BOOL)animated不执行 解决方法如下: 先在 *.h 头文件里加上<UINavigationControllerDelegate> 接着在*.m 文件里加上相关代码 self.navigationController.delegate=self; 再使用此时navigationController的代理函数,就OK了。 -(void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated { [viewController viewWillAppear:animated]; } -(void)viewWillAppear:(BOOL)animated { NSLog(@"现在可以使用了"); } 代码实例: MyOrders.h @interface MyOrders : UIViewControllerlegate>{ } @property(nonatomic,retain)IBOutlet UITableView *table; MyOrders.m - (void)viewDidLoad { [super viewDidLoad]; self.navigationController.delegate=self; } -(void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated { [viewController viewWillAppear:animated]; } -(void)viewWillAppear:(BOOL)a... 阅读全文
iOS中使用xpc/xpc.h 四月 11, 2018 sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/xpc /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/xpc sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/launch.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/launch.h #中间的MacOSX的版本号可能会有所不同。# 阅读全文
评论
发表评论