随笔分类 - IOS
IOS 开发
摘要:1、 2、 3、 4、vue.js调用
阅读全文
摘要:1、原生调用vue.js 某个vue组件下的方法。 比如**.vue里面有个这样的方法: 如果这样的话,在iOS或者Android里面是调用不了这个ajax方法的。 需要在**.vue (我的版本是vue1.0)。 在iOS里面调用js方法: 。
阅读全文
摘要:+ (BOOL)getProxyStatus { NSDictionary *proxySettings = NSMakeCollectable([(NSDictionary *)CFNetworkCopySystemProxySettings() autorelease]); NSArray *p
阅读全文
摘要:- (UIImage *)imageWithCornerRadius:(CGFloat)radius { CGRect rect = (CGRect){0.f, 0.f, self.size}; UIGraphicsBeginImageContextWithOptions(self.size, NO
阅读全文
摘要:- (NSArray *)rangesOfString:(NSString *)searchString inString:(NSString *)str { NSMutableArray *results = [NSMutableArray array]; NSRange searchRange
阅读全文
摘要:1、需要引入#import <AVFoundation/AVFoundation.h>头文件, 2、在需要播放的地方添加: AudioServicesAddSystemSoundCompletion(kSystemSoundID_Vibrate, NULL, NULL, systemAudioCal
阅读全文
摘要:程序被硬关闭后,只能执行这三个回调,而且必须写在appdelegate中,退出ibeacons信息区域时会有延时10秒左右,进入时无延时- (void)locationManager:(CLLocationManager *)manager didDetermineState:(CLRegionSt
阅读全文
摘要:资源文件都是放在根目录下 1、index.html <html> <head> <title>My test Page</title> <link rel="stylesheet" href = "test.css" type="text/css"/> <script type = "text/ja
阅读全文
摘要:1、新建分类 #import "UIViewController+swizzling.h"#import <objc/runtime.h>@implementation UIViewController (swizzling)//load方法会在类第一次加载的时候被调用//调用的时间比较靠前,适合在
阅读全文
摘要:self.view.window.rootViewController.modalPresentationStyle = UIModalPresentationCurrentContext; //半透明 BiaoQianViewController *biaoQianVC = [[BiaoQi...
阅读全文
摘要:CATransition *animation = [CATransition animation]; animation.duration = 0.4; animation.timingFunction = UIViewAnimationCurveEaseInOut; animation.f...
阅读全文
摘要:UIView *view2 = [[UIView alloc] initWithFrame:CGRectMake(120, 10, 80, 80)]; view2.backgroundColor = [UIColor redColor]; [self.view addSubview:view2]; ...
阅读全文
摘要:iOS7光标问题有网友遇到textView在ios7上出现编辑进入最后一行时光标消失,看不到最后一行,变成盲打,stackOverFlow网站上有大神指出,是ios7本身bug,加上下面一段代码即可(网友调试得出,在此mark一下,有问题,欢迎大神们指出)1234567891011121314151...
阅读全文
摘要:http://blog.csdn.net/volcan1987/article/details/9969455
阅读全文
摘要:1、判断是否安装了app Open scheme(mtcmtc) defined in iPhone with parameters open unknown with fallback to appstore Only...
阅读全文
摘要:转自:http://blog.iosxcode4.com/archives/160 用到的FrameWork有: MediaPlayer.framework,QuartzCore.framework,CoreVideoframework,CoreMedia.framework,AVFoundatio
阅读全文
摘要:- (void)willPresentAlertView:(UIAlertView *)alertView{ UIView * view = [alertView.subviews objectAtIndex:2]; if([view isKindOfClass:[UILabel class]]){ UILabel* label = (UILabel*) view; CGRect frame = label.frame; frame.origin.x +=10; label.frame = frame; label.textAlignment = UIText...
阅读全文
摘要:http://www.cnblogs.com/tangbinblog/archive/2012/07/11/2586472.html
阅读全文
摘要:NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSString *savedImagePath = [documentsDirectory stringByAppendingPathComponent:@"savedImage.png"]; //also be .jpg or another ...
阅读全文