- 博客(72)
- 收藏
- 关注
原创 iphone中 iframe白屏问题
在 cordova 项目里的 config.xml里加上 <access origin="*" /> <allow-navigation href="*" /> <allow-intent href="*" />
2018-04-28 18:42:12 3522
原创 cordova declare styleable 错误
出现 ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute可以使用cordova plugin add cordova-plugin-file-opener2 cordova-android-support-gradle-release 命令安装支持现在版本的插件解决问题
2018-03-13 15:43:18 280
原创 隐藏 video标签的下载按钮
在 cordova-plugin-inappbrowser插件中隐藏 Android 的 webView里的 <video>标签: let webView = window.cordova.InAppBrowser.open(fileUrl, '_blank', 'location=yes,enableViewportScale=yes') if (window.dev...
2018-03-06 18:10:57 1819
原创 Cocos2d 与OC的互相调用
JS里面调用OCvar ret = jsb.reflection.callStaticMethod("NativeOcClass", "callNativeUIWithTitle:andContent:", "cocos2d-js", "Yes! you call a Native UI from Reflection");对应的Oc代码为: +(BOOL)callNativeUIWith
2016-11-17 18:01:50 1694
转载 TabbarItem没有文字,图片居中
// 矫正TabBar图片位置,使之垂直居中显示 CGFloat offset = 5.0; for (UITabBarItem *item in self.tabbar.items) { item.imageInsets = UIEdgeInsetsMake(offset, 0, -offset, 0); }
2016-11-02 14:14:14 1421
原创 IOS10.1真机调试
把ios10.1模拟器文件放到应用程序–显示包内容–Developer–Platforms–iPhoneOS.platform–DeviceSupport里下载:链接: https://pan.baidu.com/s/1bpoSSyV 密码: wura
2016-10-17 13:15:47 2840
转载 app名称多语言
创建strings文件,改名InfoPlist.strings. 在右侧的Localization里面选取多语言 每个语言strings里面”CFBundleDisplayName” = “对应app名称”;
2016-10-17 09:50:54 356
原创 xcode7.3使用 ios10 真机调试
把ios10包放在: 应用程序–显示包内容–Developer–Platforms–iPhoneOS.platform–DeviceSupport里ios10包地址: http://pan.baidu.com/s/1kUQnKAr 49tn
2016-08-31 17:18:33 5793 2
转载 setneedsdispaly
setneedsdispaly并不是立即调用drawrect,而是添加一个标识,下次屏幕刷新时才会调用 屏幕刷新是每秒60次 所以用NSTimer添加setneedsdispaly方法时,如果方法调用过快会导致越来越卡,这时候使用CADisplayLink可以解决问题
2016-08-26 11:17:37 259
转载 xcode8 IOS10 远程推送问题:未找到应用程序的“aps-environment”的权利字符串
原地址:http://www.jianshu.com/p/62f631012853
2016-08-24 12:32:15 4816
转载 Xcode真机调试出现“ is busy: Processing symbol files”
原地址: http://www.cocoachina.com/bbs/read.php?tid=1678685有时升级完Xcode,真机调试的时候却出现“* is busy: Processing symbol files”网上虽然有以下解决方法: 1、尝试重新拔插测试设备。 2、如果“1”不起作用,重启Xcode尝试。 3、如果“2”不起作用,重启手机,然后尝试。(解决)。但是有时还是
2016-08-24 11:41:04 2642
转载 iOS开发之如何跳到系统设置里的各种设置界面
原地址: http://www.superqq.com/blog/2015/12/01/jump-setting-per-page/跳到更多设置界面除了跳到WiFi设置界面,能不能跳到其他的设置界面呢?比如:定位服务、FaceTime、音乐等等。都是可以的,一起来看看如何实现的!定位服务定位服务有很多APP都有,如果用户关闭了定位,那么,我们在APP里面可以提示用户打开定位服务。点击到设置界面设置,
2016-08-19 15:24:26 293
原创 placeholder颜色
[tf setValue:[UIColor whiteColor] forKeyPath:@"_placeholderLabel.textColor"];
2016-08-18 15:00:23 237
转载 在iOS7之后,苹果会自动给导航控制器里面的所有UIScrollView顶部都会添加额外的滚动区域64.
// 设置不需要添加额外的滚动区域 self.automaticallyAdjustsScrollViewInsets = YES;
2016-08-18 13:17:42 332
转载 Xcode插件: 控制台打印插件 KZLinkedConsole
原简书地址:http://www.jianshu.com/p/9c88380c24e6OC : #if DEBUG #ifndef DLog#define DLog(format, args...) \ NSLog(@"[%s:%d]: " format "\n", strrchr(__FILE__, '/') + 1, __LINE__, ## args); #endif #else
2016-08-17 10:35:08 460
原创 当两个viewController的背景色不同时,使用self.navigationController pushviewcontroller 出现bug 时
在第二个控制器里设置一下背景色就好了
2016-08-16 15:56:58 324
转载 宏定义输出
#ifdef DEBUG //调试阶段//...表示在宏里面的可变参数//__VA_ARGS__表示宏里面的可变参数#define VLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);#else //发布阶段#define SLog(...)#e
2016-08-15 11:23:29 621
转载 ios 截图.image的旋转问题
截图://截图- (UIImage*)captureView:(UIImageView*)theView{ CGRect rect = theView.frame; UIGraphicsBeginImageContext(rect.size); CGContextRef context = UIGraphicsGetCurrentContext(); [theVi
2016-08-12 17:03:22 342
转载 本地化处理
比如searchBar的取消按钮的cancel改为取消在 PROJECT->info ->Localizations 里添加Chinese(Simplified)就好了,它自己就变成了取消了。
2016-08-10 13:02:27 216
转载 tableView搜索功能
框架:https://github.com/honeycao/HCSortAndSearchDemo github里面有详细的说明 支持中文排序#import "ChineseToPinyin.h"#import "HCSortString.h"#import "WLCCityTVC.h"#import "WLCProvinceModel.h"#import "ZYPinYinSearc
2016-08-09 17:28:51 1344 3
原创 如果上传字典数组到服务器,服务器显示的格式不是字典数组
int index = 0; for (NSDictionary* dic in self.contactArrM) { for (NSString* key in [dic allKeys]) { params[[NSString stringWithFormat:@"related_contacts[%d][%@]", index, key]] =
2016-08-05 14:39:05 235
原创 调用完系统相机,状态栏消失
添加- (void)viewWillAppear:(BOOL)animated{ [super viewWillAppear:animated]; [[UIApplication sharedApplication] setStatusBarHidden:NO];}
2016-08-04 18:10:17 214
原创 键盘大写与字符串大写
键盘:cell.textField.autocapitalizationType = UITextAutocapitalizationTypeAllCharacters;字符串 textField.text = [textField.text uppercaseStringWithLocale:[NSLocale currentLocale]];
2016-08-03 18:32:01 551
原创 Please file a radar on UIKit if you see this assertion.
不知道具体原因 在使用MWPhotoBrowser框架时遇到过这个问题 MW在使用时会导致内存过大
2016-08-03 15:41:54 2318
转载 textField限定输入字数
原地址 : http://blog.sina.com.cn/s/blog_60f977e70101g4gj.html<1>在init时候注册notification:[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(textFiledEditChanged:)
2016-08-03 15:40:43 888
原创 scrollView使用masonry
//使用 [self.view addSubview:scrollV];//不能用self.view = scrollV; [scrollV mas_makeConstraints:^(MASConstraintMaker* make) { make.edges.mas_equalTo(self.view); //contentSize 随着内容增多而增多
2016-07-26 13:30:08 234
转载 UIButton增加响应区域
原文地址:http://wenrisheng.iteye.com/blog/1987996给UIButton 建立一个Category:–UIButton+EnlargeEdge.h#import <objc/runtime.h>@interface UIButton (EnlargeEdge)- (void)setEnlargeEdge:(CGFloat) size;- (void)setEn
2016-07-25 16:32:13 299
原创 UIAlertController使用
UIAlertController* alertC = [UIAlertController alertControllerWithTitle:@"确认要离开吗?" message:@"离开的话已填的数据就没了哦" preferredStyle:UIAlertControllerStyleAlert]; //style分为中间弹出,还是底下弹出列表 UIAlertAction* cancel
2016-07-21 14:41:13 228
原创 重写navagationBar.backBarbuttonItem的返回方法
https://github.com/onegray/UIViewController-BackButtonHandler 把里面的文件拖入到项目中,重写-(BOOL)navigationShouldPopOnBackButton{ return YES;//YES是执行,NO是不执行}
2016-07-21 14:17:31 334
转载 含有字典的数组排序
NSArray *sortDescriptors = [NSArray arrayWithObject:[NSSortDescriptor sortDescriptorWithKey:@"loan_days" ascending:YES]]; [self.infoArrM sortUsingDescriptors:sortDescriptors];
2016-07-20 15:00:21 333
转载 去除tabBar上方横线
-(void)hiddenTopLine { /// 隐藏底部 TabBar 的上横线 for (UIView *view in self.tabBarController.tabBar.subviews) { if ([view isKindOfClass:[UIImageView class]] && view.bounds
2016-07-20 14:16:57 385
原创 UIButton 图片文字左右互换
[self setTitleEdgeInsets:UIEdgeInsetsMake(0, -self.imageView.frame.size.width, 0, self.imageView.frame.size.width)]; [self setImageEdgeInsets:UIEdgeInsetsMake(0, self.titleLabel.bounds.size.width,
2016-07-20 14:00:38 946
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人