![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
IOS
ITzhongzi
不管前方的路有多远和多苦,只要走的方向是正确的,不管多么崎岖不平,都比站在原地更接近幸福!
展开
-
OC基础NSString基础知识和代码
oc字符串和c语言字符串之间的转换oc字符串检查大小写转换oc字符串特定的前缀和后缀检测//// main.m// demo//// Created by 黄海农业 on 2019/5/10.// Copyright © 2019 黄海农业. All rights reserved.//#import <Foundation/Foundation.h>...原创 2019-05-10 15:30:43 · 188 阅读 · 0 评论 -
ios监听软键盘打开关闭事件
#import "ViewController.h"@interface ViewController ()<UITextFieldDelegate, UITextViewDelegate>@end@implementation ViewController- (void)viewDidLoad { [super viewDidLoad]; // ...原创 2019-06-12 09:46:49 · 1818 阅读 · 0 评论 -
iOS浅谈模拟器弹不出键盘的问题
前言: 昨天帮一个小伙伴调试程序的时候,在模拟器上发现一个问题,就是点击UITextField之后,弹不出键盘…可能有的朋友要说了,那还不容易,你直接Toggle Software Keyboard(command+k)不就解决了吗,可是试了好几遍就是弹不出键盘,不知道是什么鬼首先分析一下command+K为什么没有作用… 由于在iOS8.0及以后的模拟器中,Xcode默认是使用电脑键盘作...转载 2019-06-12 09:26:23 · 1666 阅读 · 0 评论 -
ios底部工具栏
效果展示代码示例#import "ViewController.h"@interface ViewController ()@property(strong, nonatomic) UILabel *label;@end@implementation ViewController- (void)viewDidLoad { CGRect screen = [[UIS...原创 2019-06-17 15:01:01 · 1358 阅读 · 0 评论 -
ios ProgressView进度条示例 demo
运行效果代码#import "ViewController.h"@interface ViewController ()@property(strong,nonatomic) UIProgressView *progressView;@property(nonatomic, strong) NSTimer *timer;@end@implementation ViewContr...原创 2019-06-17 11:00:11 · 676 阅读 · 0 评论 -
ios UIAlertController弹出框的使用
运行效果示例demo//// ViewController.m// alertViewAndSheet//// Created by 黄海农业 on 2019/6/17.// Copyright © 2019 黄海农业. All rights reserved.//#import "ViewController.h"@interface ViewControlle...原创 2019-06-17 09:55:01 · 1777 阅读 · 0 评论 -
Ios网络请求(NSURLSession)
推荐文章IOS网络访问之NSURLSessioniOS开发网络篇—发送GET和POST请求(使用NSURLSession)get请求示例代码NSURL *url = [NSURL URLWithString:@"http://www.imooc.com"]; //表示客户端发起的网络请求内容 NSURLRequest *request = [NSURLRequest r...原创 2019-06-03 11:40:06 · 1379 阅读 · 0 评论 -
ios json解析demo
#import "ViewController.h"@interface ViewController ()@property (weak, nonatomic) IBOutlet UITextField *tvParseResult;@end@implementation ViewController- (void)viewDidLoad { [super viewDi...原创 2019-05-29 17:41:38 · 212 阅读 · 0 评论 -
ios WKWebView混合开发案例
说明加载本地的html页面。loadHTMLString:baseURL: 设置主页的基本路径,通过一个html字符串加载主页数据loadData:MIMEType:characterEncodingName:baseURL: 指定mime类型、 编码集、和nsdata对象加载一个主页数据,并设置主页文件的基本路径。加载网络的页面loadRequest : 使用详情见下面的dem...原创 2019-06-13 14:03:54 · 799 阅读 · 0 评论 -
ios页面传值总结
该要: 页面间的传值一共分为六种方式。 属性传值, 单例传值, NSUserDefaults传值, 代理传值, block传值, 通知传值区别和用途属性传值最简单的传值方式,正向传递。在第二个页面 中定义一个属性,在第一个页面中赋值。并在第二个页面中取出来使用。单例传值很灵活,可以双向传递。(写入内存读取)需要定义一个静态单例,第一个页面赋值给静态对象,第二个页面从其中...原创 2019-05-28 17:41:32 · 402 阅读 · 0 评论 -
ios gif的分解和展示
- (void)viewDidLoad { [super viewDidLoad]; //分解 gif [self deCompositionGif]; //显示gif [self showGif];}/* gif图片分解步骤 1. 拿到 gif 数据 2. 将 gif 分解为一帧帧 3. 将单...原创 2019-05-30 15:34:32 · 734 阅读 · 0 评论 -
ios图片格式转换和加载图片
- (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view.// UIImage *image = [UIImage imageNamed:@"2.jpg"]; // 图片保存到相册// UIImageWriteToSavedPho...原创 2019-05-30 14:38:36 · 780 阅读 · 0 评论 -
IOS图片采集demo
运行效果#import "ViewController.h"#import <MobileCoreServices/MobileCoreServices.h>#import <AVKit/AVKit.h>#import <AVFoundation/AVFoundation.h>//两个协议 一个 采集图片 另一个是 显示图片@interface V...原创 2019-05-27 14:37:10 · 265 阅读 · 0 评论 -
IOS UIImageVIew基本使用
- (void)viewDidLoad { [super viewDidLoad]; //UIImage png jpg NSString *path = [[NSBundle mainBundle] resourcePath]; // 工程目录路径 NSString *imagePath = [NSString stringWithFormat:@"%@...原创 2019-05-27 10:41:04 · 1074 阅读 · 0 评论 -
IOS UILabel的基本使用
- (void)viewDidLoad { [super viewDidLoad]; UILabel *label = [[UILabel alloc] init]; label.frame = CGRectMake(10, 100, 300, 300); label.backgroundColor = [UIColor yellowColor]; ...原创 2019-05-27 09:30:06 · 197 阅读 · 0 评论 -
ios异常'Application windows are expected to have a root view controller
异常描述: 'Application windows are expected to have a root view controller at the end of application launch'原因:现阶段的iOS应用开发,我们必须在AppDelegate中设置self.window.rootViewController,但是在以前老版本的xcode中可以不设置,iOS应用...原创 2019-05-22 15:02:43 · 1507 阅读 · 0 评论 -
IOS UIswitch基本使用
- (void)viewDidLoad { [super viewDidLoad]; CGRect screen = [[UIScreen mainScreen] bounds]; CGFloat switchScreenSpace = 39; self.rightSwitch = [[UISwitch alloc] init]; ...原创 2019-06-12 10:54:18 · 2355 阅读 · 0 评论