![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
移动
猴子和派大星
这个作者很懒,什么都没留下…
展开
-
ios 传值方法
一丶单利传值1.创建继承NSObject的Single文件.h中//通过类方法创建单利对象+(instancetype)sharedInstance;//创建字符串 存值拿值@property (nonatomic,strong) NSString *Zhi;.m+(instancetype)sharedInstance{ //通过静态变量的方式创建变量 ...原创 2019-12-07 19:14:07 · 166 阅读 · 0 评论 -
MapKit定位
1.添加数据库2.COM+N创建文件3.导入创建的文件头文件#import “ViewController.h”#import “mapViewController.h”4.创建表格(表格内容)点击表格进行跳转@interface ViewController ()<UITableViewDelegate,UITableViewDataSource> { ...原创 2018-10-12 09:25:10 · 595 阅读 · 0 评论 -
本地推送
1.创建开关如图操作2.开关为OFF3.拖拽后Connection选择Action4.Type选择UISwitch5.ViewController中点击开关按钮if(sender.on == YES){ UILocalNotification *local=[[UILocalNotification alloc]init]; //设置通知的标题 ...原创 2018-10-12 18:53:52 · 99 阅读 · 0 评论 -
百度语音识别
1. 打开网络连接权限 (不会看我以前文章) 在工程左侧创建一个文件夹 option+command+n 命名为SDK 2. 选中SDK文件夹 show in finder 打开Finder目录 3. 把文件(名字为BDvoiceSDK , 里面有两个文件) 里面的两个文件复制粘贴到SDK目录里 (BDvoiceSDK文件自取 , 在我的资源里) 4. 选择SDK文件 AD...原创 2018-10-09 09:08:28 · 529 阅读 · 0 评论 -
QQ接收消息
打开终端输入cd+空格拖进新建的工程.然后输入pod init ,打开新建工程的文件夹, 里面就会有Podfile文件,打开将下面的粘贴里面,输入pod install下载完成关闭pod ‘RongCloudIM/IMLib’, ‘~> 2.8.3’pod ‘RongCloudIM/IMKit’, ‘~> 2.8.3’然后导入头文件在appdelegate#impor...原创 2018-10-09 16:17:02 · 545 阅读 · 0 评论 -
访问摄像头
1.首先使用Cocoapods导入库 ZBarSDK2.敲代码:ViewController.h//// ViewController.h// erweima//// Created by shaoting on 15/12/16.// Copyright © 2015年 9elephas. All rights reserved.//#import <UIKit...原创 2018-10-19 11:30:54 · 308 阅读 · 0 评论 -
二维码扫描
1.导入三方依赖库 记得给开相机权限AVFoundation.framework2.接下来vc.m文件三个outlet的拖线控件 UIView的 viewPreview UILabel的 lblStatus UIButton的 startBtn一个action的拖线控件 UIButton的startStopReading(和上面的那个btn用的一个)(总共是三个控件 UIview UIl...原创 2018-10-19 15:28:17 · 165 阅读 · 0 评论 -
面部识别
#import “ViewController.h”#import “one1ViewController.h”#import <LocalAuthentication/LocalAuthentication.h>@interface ViewController ()@property (nonatomic,strong)LAContext *laCtx;//TouchID管...原创 2018-10-20 12:35:16 · 312 阅读 · 0 评论 -
登入进行面部识别扫码跳转
1.导入一下数据库2.创建新文件COM+N记得勾选Also create XIB file3.创建新文件 选择macOS中的Objective-c File文件注意:⚠️File Type:(为Category)文件 class:为NSString类型4.在NSString+regular.h中//声明+(BOOL)judgePassWordLegal:(NSString *)...原创 2018-10-20 16:16:07 · 689 阅读 · 0 评论 -
高德导航
1.自动用CocoaPods 安装 SDK3D地图SDKAMap3DMap2D地图SDKAMap2DMap搜索功能AMapSearch定位SDKAMapLocation导航SDKAMapNavi2.Ap.m导入头文件#import &quot;AppDelegate.h&quot;#import &amp;lt;AMapFoundationKit/AMapFoundationKit.h&amp;gt;#i...原创 2018-10-25 09:18:56 · 1140 阅读 · 0 评论 -
抽屉效果
1.导航控制器在AppDelegate.m中2.V.m中#import "ViewController.h"#define hcheight [UIScreen mainScreen].bounds.size.height@interface ViewController ()<UITableViewDelegate,UITableViewDataSource>{ U...原创 2018-10-23 14:13:50 · 158 阅读 · 0 评论 -
切换动画
#import "ViewController.h"@interface ViewController ()@property (strong, nonatomic) UIView *contentView;@property (strong, nonatomic) UIButton *popBtn;@end@implementation ViewController- (voi...原创 2018-10-23 14:31:48 · 125 阅读 · 0 评论 -
微信分享
1.2.-Objc-all_load4.导入微信SDKapp.h#import “WeChatSDK1.8.3_NoPay/WXApi.h”@interface AppDelegate : UIResponder <UIApplicationDelegate , WXApiDelegate>5.app.m- (BOOL)application:(UIApplic...原创 2018-10-26 14:00:34 · 109 阅读 · 0 评论 -
头tabbar
1.导入第三方SCNavTabBar 或者自动导入2.在下tabbar一个界面中 创建继承BassViewController文件用来写表格等=======3.创建多个页面成一下效果都是继承与BassViewController4.在下tabbar一个.m页面中 导入页面头文件和第三方头文件#import "toutiaoViewController.h"#import "yul...原创 2018-10-30 16:30:17 · 191 阅读 · 0 评论 -
导航标题颜色和字体更改
self.navigationItem.title=@"数码科技"; self.navigationController.navigationBar.titleTextAttributes=@{NSForegroundColorAttributeName:[UIColor whiteColor],NSFontAttributeName:[UIFont systemFontOfSize:16]...原创 2018-11-01 14:02:18 · 319 阅读 · 0 评论 -
分区文字判断
// 设置分区头部文字- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { UIView *view = [[UIView alloc] init]; UILabel *lab = [[UILabel alloc] initWithF...原创 2018-11-03 08:50:15 · 93 阅读 · 0 评论 -
网格进行跳转
//点击网格进行跳转-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{ if(indexPath.row==0){ NSLog(@"点击了1!"); t1ViewController *t1=[...原创 2018-11-03 09:51:17 · 183 阅读 · 0 评论 -
上拉刷新
1.coco继承pod ‘MJRefresh’2.v.h中写入@property(nonatomic , assign)int *Page;3.v.m中导入头文件#import <MJRefresh.h>4.写入属性@property(nonatomic,strong)NSMutableArray * dataSource;- (void)viewDidLoad { ...原创 2018-11-03 11:04:31 · 83 阅读 · 0 评论 -
网格跳转+刷新
1.coco继承刷新控件pod ‘MJRefresh’2.v.h@property(nonatomic , assign)int *Page;3.v.m#import "ViewController.h"#import "t1ViewController.h"#import "t2ViewController.h"#import "t3ViewController.h"#imp...原创 2018-11-03 11:15:43 · 104 阅读 · 0 评论 -
SAX解析
1.创建Student 继承NSObject2.在Student.h中写入属性@property(nonatomic,strong)NSString *name,*age,*sex;3.A.m中写入导航#import "AppDelegate.h"#import "ViewController.h"@interface AppDelegate ()@end@implemen...原创 2018-11-06 09:16:26 · 96 阅读 · 0 评论 -
DOM解析
1.导入文件夹DOM解析类第三方包2.创建model文件继承与NSObject3.model.h中写入属性@property (nonatomic,strong)NSString *name,*age,*sex;4.APP.m中写入导航#import "AppDelegate.h"#import "ViewController.h"@interface AppDelegate ()...原创 2018-11-06 09:22:08 · 109 阅读 · 0 评论 -
iOS 菜单 PopMenu
1.CocoaPods 集成pod ‘PopMenu’2.v.mNSMutableArray *items = [[NSMutableArray alloc] initWithCapacity:3];MenuItem *menuItem = [[MenuItem alloc] initWithTitle:@"Flickr" iconName:@"post_type_bubble_flickr...原创 2018-11-06 10:58:19 · 907 阅读 · 0 评论 -
下拉菜单加跳转
1.导入文件WTKDropView2…m导入头文件和跳转文件#import "WTKDropView.h"#import "tzViewController.h"#define WS(weakSelf) __weak __typeof(&*self)weakSelf = self;3.写属性@property (nonatomic,strong)WTKDropView ...原创 2018-11-06 11:55:06 · 191 阅读 · 0 评论 -
自定义下拉菜单
1.BOLL@interface oneViewController ()@property(nonatomic,strong)UIView *view1;@property(nonatomic,strong)UIImageView *img;@property(nonatomic,strong)UIButton *btn;@endBOOL an;@implementation o...原创 2018-11-06 13:50:58 · 312 阅读 · 0 评论 -
下拉刷新,上拉删除表格
popo继承pod ‘MJRefresh’v.h@property (nonatomic , assign)int page;v.m#import "ViewController.h"#import <MJRefresh.h>@interface ViewController ()<UITableViewDelegate,UITableViewDataSource&...原创 2018-11-09 11:37:05 · 153 阅读 · 0 评论 -
AFNetting MJExtension.h 解析
1.coco 导入pod ‘AFNetworking’pod ‘MJExtension’2.M中创建继承NSObject 文件为MD在M.h中写属性@property (nonatomic, copy) NSString * img;@property (nonatomic, copy) NSString * Ztext;@property (nonatomic, copy) NSS...原创 2018-11-09 19:17:04 · 148 阅读 · 0 评论 -
网格
//// ViewController.m// 222//// Created by 三哥哥 on 2018/11/1.// Copyright © 2018年 三哥哥. All rights reserved.//#import “ViewController.h”@interface ViewController ()<UITableViewDataSource,...原创 2018-11-02 16:27:29 · 160 阅读 · 0 评论 -
新闻视频部分
1.创建M V C文件2.在M文件中创建继承NSObject的文件为VIdeoModel3.在VIdeoModel.h中写属性@property(nonatomic,copy)NSString *replyCount;//跟贴@property(nonatomic,copy)NSString *cover;//图片@property(nonatomic,copy)NSString *...原创 2018-11-02 14:31:56 · 107 阅读 · 0 评论 -
网络请求
-(void)loadData{ //开始网络请求 AFHTTPSessionManager *manager =[AFHTTPSessionManager manager]; //默认请求类型 manager.responseSerializer=[AFHTTPResponseSerializer serializer]; //GET方法 [man...原创 2018-11-07 11:55:46 · 119 阅读 · 0 评论 -
下拉菜单
1.导入coco pod ‘MLMenu’2.V.m中写头文件#import <MLMenu/MLMenuView.h>#define MLClolor(r,g,b,a) [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:a]#define k_ScreenHeight [UIScreen...原创 2018-11-05 14:27:26 · 116 阅读 · 0 评论 -
底部弹窗
1.V.M- (void)viewDidLoad { [super viewDidLoad]; //设置背景色 self.view.backgroundColor = [UIColor yellowColor]; //弹出按钮 UIButton *alertBt = [UIButton buttonWithType:UIButtonTypeSystem];...原创 2018-11-05 16:42:54 · 192 阅读 · 0 评论 -
分区数组解析
//分区 self.array = [NSMutableArray new]; //z数组 self.titleArray = [NSMutableArray new]; AFHTTPSessionManager * manager = [AFHTTPSessionManager manager]; manager.responseSerializer =...原创 2018-11-13 11:54:01 · 153 阅读 · 0 评论 -
iPhone X 适配
// iPhoneX适配#define Is_Iphone (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)#define Is_Iphone_X (Is_Iphone && kScreenHeight == 812.0)// 状态栏高度#define kStatusHeight (Is_Iphone_X ? ...原创 2018-11-13 16:24:25 · 147 阅读 · 0 评论 -
默认为关闭大标题模式
// 默认为关闭大标题模式 self.navigationController.navigationBar.prefersLargeTitles = YES; self.title = @"健康";原创 2018-11-12 14:47:19 · 96 阅读 · 0 评论 -
文本提示可以改颜色的代码
//提示文字颜色 _text2.attributedPlaceholder = [[NSAttributedString alloc] initWithString:@"填写手6位以上的数字"attributes:@{NSForegroundColorAttributeName: [UIColor lightGrayColor]}];...原创 2018-11-12 16:02:06 · 533 阅读 · 0 评论 -
视频播放
1.导入视频到项目中2.导入数据库#import <AVKit/AVKit.h>//.m写入<AVKit/AVKit.h>可以写入控件按钮什么的#import <AVFoundation/AVFoundation.h>///系统播放库3.//获取本地资源 NSString *file=[[NSBundle mainBundle]pathForResou...原创 2018-11-14 11:59:49 · 110 阅读 · 0 评论 -
自定义网格步奏
1.创建继承CollectionViewCell的文件为:CECollectionViewCell2.在CE.h中写入属性@property (nonatomic, strong) UIImageView *imgView; // 图片@property (nonatomic, strong) UILabel *label; // 内容3.在CE.m中写入自定义-(instance...原创 2018-11-14 16:04:55 · 130 阅读 · 0 评论 -
tabbar图片位置大小修改
vc.tabBarItem.imageInsets = UIEdgeInsetsMake(8, 0, -8, 0);原创 2018-11-16 11:45:54 · 3310 阅读 · 0 评论 -
IOS plist文件内容获取本地内容方法
//获取plist文件 NSURL *URL=[[NSBundle mainBundle]URLForResource:@"Property List" withExtension:@"plist"]; //plist 文件为字典类型 NSDictionary *dic=[NSDictionary dictionaryWithContentsOfURL:URL];...原创 2018-11-16 11:48:15 · 1864 阅读 · 0 评论 -
播放View 点击判断
//创建底部view-(void)SV{ // 设置底部view UIView *view1 = [[UIView alloc]initWithFrame:CGRectMake(0, self.view.frame.size.height-60, self.view.frame.size.width, 60)]; // 设置颜色 view1.backgroundC...原创 2018-11-16 15:48:48 · 106 阅读 · 0 评论