E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
NSNotification
iOS开发 - ANPs推送通知
推送通知注意:这里说的推送通知跟
NSNotification
有所区别
NSNotification
是抽象的,不可见的推送通知是可见的(能用肉眼看到)iOS中提供了2种推送通知本地推送通知(LocalNotification
陆讯
·
2020-08-18 03:56
iOS开发实例
IOS-中英文键盘判断方法学习
-(void)keyboardWillChangeFrame:(
NSNotification
*)notification{//if(!
weixin_30482383
·
2020-08-17 03:55
昨日笔记
NSNotificationCenter通知中心是同步操作如果想异步采用下面方法
NSNotification
*notification=[NSNotificationnotificationWithName
wangyadong99
·
2020-08-17 03:24
移动开发
NotificationCenter 文档教程(SwiftUI Foundation 中文手册)
classNotificationCenter:NSObject总览对象在通知中心注册,以
NSNotification
使用或方法接收通知(对象)。当对象将自己添加为观察者时,它指定应接收的通知。
知识大胖
·
2020-08-16 12:47
SwiftUI
Foundation
技术文档及手册
获取第三方键盘高度(包括自带键盘高度)
#pragma键盘事件-(void)keyboardWillShown:(
NSNotification
*)notif{NSDictionary*info=[notifuserInfo];NSValue*
weixin_34273046
·
2020-08-10 03:52
IOS完美适配键盘高度,解决被遮盖问题的思想
-(void)keyboardFrameChanged:(
NSNotification
*)notice{// NSDictionary*userInfo =notice.userInfo;//
超级系统出售
·
2020-08-09 18:39
iOS键盘弹出时动画时长失效问题
-(void)keyboardWillShow:(
NSNotification
*)notification{[UIViewanimateWithDuration:15animati
weixin_33857679
·
2020-08-04 04:29
iOS屏幕状态监听
手机旋转状态监听方法一://状态监听NotificationCenter.default.addObserver(self,selector:#selector(didOrientate(noti:)),name:
NSNotification
.Name.UIDeviceOrientationDidCha
kangpp
·
2020-08-03 10:58
iOS
iOS 中KVC、KVO、
NSNotification
、delegate 总结及区别
原文链接:http://www.mamicode.com/info-detail-515516.html1、KVC,即是指NSKeyValueCoding,一个非正式的Protocol,提供一种机制来间接访问对象的属性。而不是通过调用Setter、Getter方法访问。KVO就是基于KVC实现的关键技术之一。Demo:@interfacemyPerson:NSObject{NSString*_na
iCHENKE
·
2020-08-02 16:17
iOS理论
iOS
NSNotification
、Block、Delegate和KVO.
iOS开发中数据传递的方法有很多种,我这里整理一下常用的
NSNotification
、Block、Delegate和KVO四种方式,仅供参考,具体使用要看开发中的需求,以及项目业务逻辑的需要.希望在适当的场景和业务下选择合适的方式去提高开发效率
灵姝斐
·
2020-08-01 12:40
iOS Notification(二):处理&监听通知事件
这个通知是可以最多携带一个参数的,这个参数是一个指向
NSNotification
的对象指针。
程小龙
·
2020-07-31 16:10
翻译
IOS通知和代理的用法以及优劣比较
一个NSNotificationCenter可以有许多的通知消息
NSNotification
,对于每一个
NSNotification
可以
我就是小伟哥
·
2020-07-31 11:45
IOS
iOS 观察者+通知
NSNotificationCenter、
NSNotification
通知机制(广播电台)就像我们现在的电台一样,比如说dj子劲的电台,他那里就是一个广播中心,负责发送通知(今天的广播内容),我们如果安装了网易云客户端
yibella
·
2020-07-30 23:48
zy-技能
iOS面试题:
NSNotification
、Block、Delegate和KVO的区别
代理是一种回调机制,且是一对一的关系,通知是一对多的关系,一个对向所有的观察者提供变更通知;效率:Delegate比
NSNOtification
高;Delegate和Block一般是一对一的通信;Delegate
iOS猿_员
·
2020-07-29 09:41
关于通知中心(
NSNotification
)的应用
NSNotification
的结构点进
NSNotification
类中进去,可以看到他的基本属性和一些方法。//消息的唯一标示,用来区分各个消息,也就是说具有唯一性。
雨洒潇湘
·
2020-07-28 17:09
对象之间的调用机制 通信方式
1.直接方法调用2.Target-Action@selector()3.Delegate协议4.block(回调)5.KVO6.通知(
NSNotification
)确定使用方式1.判断通信对象是一对一的还是一对多的
正在通話中
·
2020-07-28 13:25
对象间通信方式
NSNotificationCenter - 通知中心
任何一个对象,都可以向通知中心,发布通知(
NSNotification
)其他感兴趣的对象(Observer),可以申请在某个通知发布时/某个特定对象发布通知时,收到这个通知有什么用?
js_huh
·
2020-07-25 14:41
KVO
与
NSNotification
不同的是。KVO不需要通知中心对象。而是在对象属性变化之后会直接通知观察者。KVO是基于KVC的。
明月钓无痕
·
2020-07-16 00:21
iOS 监听事件的方法
1.通知(NSNotificationCenter\
NSNotification
)任何对象之间都可以传递消息使用范围1个对象可以发通知给N个对象1个对象可以接受N个对象发出的通知必须得保证通知的名字在发出和监听时是一致的
胖红Red
·
2020-07-15 20:13
NotificationCenter的基本用法
openfuncpost(nameaName:
NSNotification
.Name,objectanObject:Any?)
CoffeeKid
·
2020-07-15 15:35
自定义
NSNotification
消息中心
原创文章转载请注明出处,谢谢端午想好好休息一下,于是就没出去玩了关于
NSNotification
大家一定不会陌生,所以这里我就不讲关于
NSNotification
的具体用法了,网上一搜一大片。
北辰明
·
2020-07-15 03:55
从子视图返回根视图,然后切换tabBar问题
后来遇到一个问题,在第三个tabBar的子视图中,有个按钮,需要切换到首页,结果点击按钮确实切换到了首页[[
NSNotification
CoderCurtis
·
2020-07-15 02:26
iOS notification
如果在一个类中想要执行另一个类中的方法可以使用通知1.创建一个通知对象:使用notificationWithName:object:或者notificationWithName:object:userInfo:
NSNotification
小熊willbetheone
·
2020-07-15 00:13
本地推送通知
要介绍的推送通知首先和
NSNotification
是不一样的,当一款app处于后台时,那么怎么让用户知道app内部发生了什么事呢,如果app本身要获取关注度,可以通过本地通知来骚扰用户,由于不能与公司的服务器进行长连接
蚂蚁牙齿不黑
·
2020-07-14 22:23
iOS利用通知(
NSNotification
)进行传值
通知是在跳转控制器之间常用的传值代理方式,除了代理模式,通知更方便、便捷,一个简单的Demo实现通知的跳转传值.iOS通知传值的使用输入所要发送的信息,同时将label的值通过button方法调用传递-(IBAction)buttonClick:(id)sender{//添加字典,将label的值通过key值设置传递NSDictionary*dict=[[NSDictionaryalloc]ini
江R
·
2020-07-14 22:41
NSNotificationCenter 通知中心
通知中心-NSNotificationCenter每一个应用程序都有一个通知中心(NSNotificationCenter)实例,专门负责协助不同对象之间的消息通信任何一个对象都可以向通知中心发布通知(
NSNotification
solozyx
·
2020-07-14 14:28
ios消息队列
消息中心是采用同步方式;消息队列采用异步方式;消息中心实例:NSNotificationCenter*nc=[
NSNotification
xiaohao2008
·
2020-07-13 22:51
iPhone开发
监听键盘事件
selector(keyboardChange:)name:UIKeyboardWillChangeFrameNotificationobject:nil];-(void)keyboardChange:(
NSNotification
iOSCoder_XH
·
2020-07-13 18:04
NSNotification
object
我们正常使用
NSNotification
进行消息传递的时候,附带参数都是通过userInfo来实现。但是最近试了一下,例如我想传个BOOL类型的参数,试着用object来传递也是可以实现的。
ANTI_JAM
·
2020-07-13 14:16
推送本地通知-创建本地通知 - (Obj-C)
推送通知和
NSNotification
区别:
NSNotification
是抽象的,不可见的推送通知是可见的(能用肉眼看到)iOS中提供了2种推送通知本地推送通知(LocalNotification)远程推送通知
ShenYj
·
2020-07-13 14:51
通知与推送
$通知:使用观察者模式来实现的用于跨层传递消息的机制关键类结构:
NSNotification
:@property(readonly,copy)NSNotificationNamename;//通知名称,
飞哥漂流记
·
2020-07-13 11:33
Swift - NSNotificationCenter 小酌
这里主要是对比一下2中监听方式第一种:发送通知(参数的组合实质就是一个
NSNotification
)NSNotificationCenter.defaultCenter().postNotificationName
离子来了
·
2020-07-13 08:07
关于iOS传值
1、使用通知来传值通知有两种写法
NSNotification
(通知中心)和KVO(Key-Value-Observes)(键值观察)。
李小起
·
2020-07-13 00:13
Objective-C 通知(
NSNotification
)及实现原理
简介通知(
NSNotification
),是采用“观察者”模式来实现,发送通知的本身不需要知道使用者是谁,也不用知道有几个使用者,只需要在通知中心发送通知就可以实现消息的一个或者多个的传递。
胡琰士
·
2020-07-12 18:08
Objective-C
HQ移动20170317期周报
1.NSAssert()和NSCAssert()的使用NSAssert()用于OC语法的断言NSCAssert()用于C语言语法的断言2.Swift3.0使用
NSNotification
.nameletkOpenXcodePathNotification
君赏
·
2020-07-12 10:00
iOS键盘遮挡UITextField问题
代码如下图:备注:-(void)keyBoardWillShow:(
NSNotification
*)notification方法中打印结果为在notification中取出键盘
上官小五
·
2020-07-11 11:41
iOS面试基础一
##KVO,
NSNotification
,delegate及block区别#将一个函数在主线程执行的4种方法##如何让计时器调用一个类方法##如何重写类方法##NSTimer创建后,会在哪个线程运行##
敲代码的黄屁屁
·
2020-07-11 01:28
APP自定义广告页、启动页、欢迎页等技巧
appdelegate中添加action,在action中可以根据传入的notification.name来判断通知的内容;eg://-通知响应funcshowMainTabBarVC(noteInfo:
NSNotification
聂荣哥
·
2020-07-10 06:20
OC单例模式详解
其实系统已经有很多单例存在,例如UIApplication、
NSNotification
、NSFileManager、NSUserDefaults等.以下代码详解ARC环境下严谨的单例模式#import
Coder_Cat
·
2020-07-10 06:37
iOS-bug:输入中文字符时的限制bug
(onTextviewChanged:)name:UITextViewTextDidChangeNotificationobject:self];-(void)onTextFieldChanged:(
NSNotification
小涵
·
2020-07-09 21:53
BugList-iOS
iOS 推送通知
注意:通知是一个应用程序级别的操作UIApplication推送通知与
NSNotification
区别
NSNotification
是抽象的,不可见的推送通知是可见的(能用肉眼看到)iOS中提供了2种推送通知本地推送通知
iOS_成才录
·
2020-07-09 18:43
Swift4.0 通知的使用
下面就介绍一下使用方法创建通知中心设置监听方法设置通知的名字NotificationCenter.default.addObserver(self,selector:#selector(test),name:
NSNotification
.Nam
BrumeLoong
·
2020-07-09 17:05
常见的通知
一、通知传值://发送通知NSDictionary*info=@{@"key":@"value"};
NSNotification
*notification=[NSNotificationnotificationWithName
风丶飞扬
·
2020-07-09 08:50
7 - NSNotificationCenter
NSNotificationCenter)一对多每一个应用程序都有一个通知中心(NSNotificationCenter)实例,专门负责协助不同对象之间的消息通信任何一个对象都可以向通知中心发布通知(
NSNotification
RadioWaves
·
2020-07-08 16:00
iOS页面间传值的方式(NSUserDefault/Delegate/
NSNotification
/Block/单例)
iOS页面间传值的方式(NSUserDefault/Delegate/
NSNotification
/Block/单例)实现了以下iOS页面间传值:1.委托delegate方式;2.通知notification
weixin_30539835
·
2020-07-08 14:13
iOS页面间传值的方式(Delegate/
NSNotification
/Block/NSUserDefault/单例)
iOS页面间传值的方式(NSUserDefault/Delegate/
NSNotification
/Block/单例)实现了以下iOS页面间传值:1.委托delegate方式;2.通知notification
st646889325
·
2020-07-08 06:34
基础
NSNotification
通知
通知:kvo______keyvalueobserver观察者机制使用通知时需要注意:要先监听通知再发送通知//注册监听通知//位置:一般写在想要监听一个通知的类中的视图将出现的方法中或者didLoad方法中[[NSNotificationCenterdefaultCenter]addObserver:selfselector:@selector(触发方法名字)name:@“通知的名字”objec
nothing_c
·
2020-07-08 02:13
设计模式之观察者模式(关于OC中的KVO\KVC\
NSNotification
)
一.KVCKVC:keyvaluescoding键值编码,间接通过字符串对应的key取出、修改其对应的属性。作用:可以访问和修改私有成员变量、readOnly成员变量的值。(替换系统自带的导航栏、替换系统自带的Tabbar等)@interfaceZBPerson:NSObject@property(nonatomic,copy,readonly)NSString*name;-(instancety
CoderZb
·
2020-07-07 15:50
2019 iOS面试题(一)---Objective_C语言特性:分类、扩展、代理、通知、KVO、KVC、属性
分类扩展代理(Delegate)通知(
NSNotification
)KVO(Key-valueobserving)KVC(Key-valuecoding)属性关键字一、分类1.分类的作用?
一个浪漫的程序员
·
2020-07-06 06:42
iOS面试精讲
iOS 关于NSNotificationCenter
通常我们在iOS中发生什么事件时该做什么是由Delegate实现的,Apple还为我们提供了另一种通知响应方式,那就是
NSNotification
.NSNotificationCenter较之于Delegate
weixin_34234829
·
2020-07-06 00:53
上一页
1
2
3
4
5
6
7
8
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他