- 博客(16)
- 收藏
- 关注

原创 FMDBTool 简易的 FMDB 封装类
//// FMDBTool.h// fmdb//// Created by gg on 2017/7/5.// Copyright © 2017年 gg. All rights reserved.//#import <Foundation/Foundation.h>#import <FMDB.h>#import <objc/runtime.h>static NSString
2017-08-10 17:40:29
1040
原创 在vue里使用 jquery
在vue里使用 jquery开发工具:vs Code 使用iview的UI框架 用cnpm(推荐)或者npm 安装jquery插件 1. cnpm install jquery –save 2.在webpack.base.config.js文件中加入 (1)const webpack = require(‘webpack’); (2)plugins: [
2017-12-10 13:20:17
392
转载 ios生成长图
+(UIImage )captureScrollView:(UIScrollView )scrollView{ UIImage *image = nil; UIGraphicsBeginImageContext(scrollView.contentSize); { CGPoint savedContentOffset = scrollView.cont
2017-03-27 10:57:22
1477
转载 获取当前城市
if (!locationManager) { if (![CLLocationManager locationServicesEnabled] || [CLLocationManager authorizationStatus] == kCLAuthorizationStatusDenied) { [[ShareTool s
2015-05-30 16:35:42
347
转载 拍照功能
打开相机:[cpp] view plaincopy//先设定sourceType为相机,然后判断相机是否可用(ipod)没相机,不可用将sourceType设定为相片库 UIImagePickerControllerSourceType sourceType = UIImagePickerControllerSourceTypeCamera; // if (![U
2015-02-26 10:18:06
377
转载 uiwebview与js交互
UIWebView是iOS最常用的SDK之一,它有一个stringByEvaluatingJavaScriptFromString方法可以将javascript嵌入页面中,通过这个方法我们可以在iOS中与UIWebView中的网页元素交互。stringByEvaluatingJavaScriptFromString 使用stringByEvaluatingJavaScriptFrom
2015-02-25 09:12:44
334
转载 UIGestureRecognizer手势的判断
#import typedef enum{ LongPressGestureRecognizer = 0, PanGestureRecognizer, PinchGestureRecognizer, RotationGestureRecognizer, SwipeGestureRecognizer, TapGestureRecogni
2015-02-24 22:22:01
387
转载 UIDevice
1. 判断是否是横向屏:BOOL b=UIDeviceOrientationIsLandscape([UIDevice currentDevice].orientation); 获取设备uniqueIdentifier :[UIDevice currentDevice].uniqueIdentifier;,但在ios5中,它已被废弃。 http://kensou.b
2015-02-23 08:16:28
411
转载 UIAccelerometer加速计
UIAccelerometer加速计是用来检测iphone手机在x.y.z轴三个轴上的加速度。要获得此类调用:UIAccelerometer *accelerometer = [UIAccelerometer sharedAccelerometer];同时,你需要设置它的delegate。UIAccelerometer *accelerometer = [UIAccelerom
2015-02-22 08:52:37
340
转载 UIpickerview
@interface Set_starViewController : UIViewController{UIPickerView *pickerview;UILabel *contentview;NSArray *content;//星座id _delegate;int _type;}-(id)initWithDel
2015-02-21 08:34:51
558
转载 UIActionSheet
UIActionSheet是在iOS弹出的选择按钮项,可以添加多项,并为每项添加点击事件。为了快速完成这例子,我们打开Xcode 4.3.2, 先建立一个single view application。然后再xib文件添加一个button,用来弹出sheet view。1、首先在.h文件中实现协议加代码的地方在@interface那行的最后添加,协议相当于java里的接口,实现协议里的
2015-02-20 10:33:28
287
转载 MPMoviePlayerController 电影播放器
MPMoviePlayerController 与AVAudioPlayer有点类似,前者播放视频,后者播放音频,不过也有很大不同,MPMoviePlayerController 可以直接通过远程URL初始化,而AVAudioPlayer则不可以。不过大体上用起来感觉差不多。废话少说进入体验。 格式支持:MOV、MP4、M4V、与3GP等格式,还支持多种音频格式。 首先你得引入 Media
2015-02-18 09:24:47
1371
转载 抽屉效果
思路1 自定义一个View,它做为显示内容的View。给这个View添加两个手势,pan拖拽,tap点击。2 当拖拽这个View时,让view.center向右移动,这样就能看到内容View向右移动了。3 定义一个抽屉打开停止时的x值为:OPENCENTERX,这个是内容View最终停止的位置4 当内容View越过中间靠右的一个x值时,view自动向右动画移动到右边位置停下。5
2015-02-17 14:35:27
403
转载 如何实现ios屏幕的横竖屏自适应
如何实现ios屏幕的横竖屏自适应首先在UIViewController的-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation方法中设置设备要支持的deviceOrientation;在UIViewController的-(void)willRo
2015-02-17 14:31:27
1062
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人