CN108762943A - Obtain method, terminal device and the storage medium of the internal realization process of notice - Google Patents

Obtain method, terminal device and the storage medium of the internal realization process of notice Download PDF

Info

Publication number
CN108762943A
CN108762943A CN201810238456.XA CN201810238456A CN108762943A CN 108762943 A CN108762943 A CN 108762943A CN 201810238456 A CN201810238456 A CN 201810238456A CN 108762943 A CN108762943 A CN 108762943A
Authority
CN
China
Prior art keywords
notice
observer
parameter
function
calling
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810238456.XA
Other languages
Chinese (zh)
Inventor
汪刚
张文明
陈少杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Douyu Network Technology Co Ltd
Original Assignee
Wuhan Douyu Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201810238456.XA priority Critical patent/CN108762943A/en
Publication of CN108762943A publication Critical patent/CN108762943A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/542Event management; Broadcasting; Multicasting; Notifications

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a kind of method, terminal device and storage mediums obtaining the internal realization process of notice, are transmitted for realizing notice, obtain notice realization process.Method provided by the invention includes:One notice center of definition stores after the parameter being passed in the observer is converted to model into customized variable data array when calling addition observer's method;When by the notice of the generation person that passes to target observations, calling is dished out notification function, and traverses the customized variable data array, the object that the notice is transmitted is obtained, wherein the object is for identifying the target observations person;The object receives the notice.By creating customized notice center so that can know the internal realization process of notice, improve code efficiency, guarantee to operate being customized of observer.

Description

Obtain method, terminal device and the storage medium of the internal realization process of notice
Technical field
The present invention relates to terminal applies development field more particularly to a kind of method obtaining the internal realization process of notice, ends End equipment and storage medium.
Background technology
In IOS development processes, the communication being often related between different controllers, common communication mode have agency, At this moment KVO and notice can be often used notice when needing Transfer Parameters to multiple objects, use the communication party at notice center Formula is not only significantly simpler to implement, but also can carry a large amount of self-defined informations in notifying.
However, notice used at present is mostly the packaged interface that IOS systems provide, being directly overwritten interface can make With although easy to use, due to being difficult to know system interface internal structure, code efficiency is relatively low, cannot be satisfied customization behaviour Make.
Invention content
An embodiment of the present invention provides a kind of method, terminal device and storage medium obtaining the internal realization process of notice, It is capable of providing customized notice center, obtains and realizes process inside notifications, solve inside existing notifications not It is transparent, cause code efficiency low, it is difficult to meet the problem of customizing operation.
In a first aspect, a kind of method obtaining the internal realization process of notice is provided, including:
A notice center is defined, when calling addition observer's method, the parameter in the observer will be passed to and converted At in storage to customized variable data array after model;When by the notice of the generation person that passes to target observations, calling is dished out notice Function, and the customized variable data array is traversed, the object that the notice is transmitted is obtained, wherein the object is for identifying institute The person that states target observations;The object receives the notice.
Second aspect provides a kind of terminal device obtaining the internal realization process of notice, including:
Memory module:For defining a notice center, when calling addition observer's method, by the incoming observer In parameter be converted to after model in storage to customized variable data array;Spider module:For the notice of generation to be passed to When target observations person, notification function of dishing out is called, and traverse the customized variable data array, obtains pair that the notice is transmitted As wherein the object is for identifying the target observations person;Execution module:The notice is received for the object.
The third aspect, provides a kind of terminal device, including memory, processor and is stored in the memory simultaneously The computer program that can be run on the processor, the processor realize side as described above when executing the computer program The step of method.
Fourth aspect, provides a kind of computer readable storage medium, and the computer-readable recording medium storage has meter Calculation machine program is realized when the computer program is executed by processor such as the step of any one of claim 1 to 5 the method.
5th aspect, provides a kind of computer program product, the computer program product includes computer program, institute It states and realizes that the acquisition notice that the application first aspect provides is internal when computer program is executed by one or more processors The step of method of realization process.
In the embodiment of the present invention, by creating customized notice center, the observer of addition is stored into array, When notice of dishing out, traversal array searches notice and transmits object, overcomes unclear using internal structure when notifications, leads to not Realize the problem of customizing operation so that can know the internal realization process of notice, code efficiency is provided, is guaranteed to observer Being customized operates, and use is more flexible.
Description of the drawings
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to embodiment or description of the prior art Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description be only the present invention some Embodiment for those of ordinary skill in the art without having to pay creative labor, can also be according to these Attached drawing obtains other attached drawings.
Fig. 1 is the notice center principle assumption diagram that the embodiment of the present invention one provides.
Fig. 2 is the implementation flow chart of the method provided by Embodiment 2 of the present invention for obtaining the internal realization process of notice;
Fig. 3 is a specific implementation flow of the method for the internal realization process of acquisition notice that the embodiment of the present invention three provides Figure.
Fig. 4 is the structural schematic diagram of the terminal device for the internal realization process of acquisition notice that the embodiment of the present invention four provides;
Fig. 5 is the structural schematic diagram for the terminal device that the embodiment of the present invention five provides.
Specific implementation mode
An embodiment of the present invention provides a kind of method, terminal device and the storages of specified operation switching realtime curve to be situated between Matter switches over for interface of the contact action comprising real time data, promotes user-interaction experience.
In order to make the invention's purpose, features and advantages of the invention more obvious and easy to understand, below in conjunction with the present invention Attached drawing in embodiment, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that disclosed below Embodiment be only a part of the embodiment of the present invention, and not all embodiment.Based on the embodiments of the present invention, this field All other embodiment that those of ordinary skill is obtained without making creative work, belongs to protection of the present invention Range.
Embodiment one:
Fig. 1 is referred to, Fig. 1 is notice center provided in an embodiment of the present invention principle assumption diagram.
Notify publisher 11 for create notify, the main body of establishment is any object.Program is in the process of running, different Transfer Parameters may be needed between class or object, when being required for using some parameter between class or object for two, an object In numerical value to pass to another object and just need to use the method for passing ginseng, since notice can pass to multiple objects, The parameter for needing to transmit is received using notice center 12 in the embodiment of the present invention, the notice center 12 is carried inside program A kind of broadcast mechanism supplied, is transmitted to the message received according to internal forwarding table the object of needs, the transmission of dispatch notification And receiving.
It is described that publisher 11 is notified to first have to notification information being packaged, specifically, added in notifying class the name of notice, The attributes such as the reception object (or notifying publisher) of notice, the information of notice, are then published to notice center 12 by the notice. It is described to notify that 12 use the forms such as dictionary, chained list, array storage notice, and be placed in notice class.
Observer a 13 is notified for receiving, that is, receives the notification information that notice is transmitted, and is executed the notice and included Operation.Optionally, observer can have multiple, and when notice specifies recipient or observer is provided with when receiving object, sees The person of examining can only receive specified notification.The observer a 13 and other observers, which have to register into notice center 12 and could receive, leads to Know, the notice center 12 includes addition observer and the method for notice of dishing out, when the observer a 13 have already registered with it is logical After knowing center 12, and when the specified recipient for the notice that the observer a13 is publication, the notice center 12 can throw notice To observer a 13, such observer a 13 can receive notice, and complete specified operation.
Notice is realized in the above-mentioned operational process for notice center, the notice center that system provides by the method mostly It transmits.Preferably, the notice center 12 can be self-defined in embodiments of the present invention, is wrapped with understanding in the notice center 12 The information that the observer that contains, notice include, the internal informations such as notice transmittance process.
Embodiment two:
Referring to Fig. 2, the implementation process of the method provided in an embodiment of the present invention for obtaining the internal realization process of notice, packet It includes:
S201, a notice center is defined, when calling addition observer's method, the parameter in the observer will be passed to It is stored into customized variable data array after being converted to model.
The notice center is the class that there is dispatch notification to send and receive function, such can also be defined as other Name, such as notice terminal, message center etc., but should have reception notice, addition observer, the functions such as notice of dishing out.Institute The method that notice center generally comprises registration observer and notice of dishing out is stated, when in calling notice provided in an embodiment of the present invention When the method that pericardium contains, incoming data information can be stored.Specifically, when addition observer, meeting Transfer Parameters into this method.Institute State parameter may include observer, observer response after call back function, notice name etc..
The model is a kind of data model, can be added to parameter in model and carry out edit, data is facilitated to store. Wherein include data fundamental type, is a kind of complete structure of encapsulation, is similar to structure.Optionally, the parameter can be with Model is not translated into, and directly by storage of array.The customized variable data array, refer to not limiting array length can from By the array of increase element, such as NSMutableArray, data dilatation can be facilitated by being used herein as variable data array storage observer And whole traversal is read.
Optionally, further include before one notice center of the definition:A notice class is defined, is added in the notice class Attribute, setting notifies observer's (object of id types is identified), and defines Fundamental construction approach, initialization data.It is described logical Know that class can be used for building notice.
Preferably, the embodiment of the present invention is the notice center defined in IOS systems.
S202, by the notice of the generation person that passes to target observations when, calling is dished out notification function, and is traversed described self-defined Variable data array, the object that the notice is transmitted is got, wherein the object is for identifying the target observations person.
The notice of the generation is the notice created, or has been published to the notice at notice center.When program will be into When row notice is transmitted, the notification method of dishing out in notice center provided in an embodiment of the present invention is called.The transmission object is id The object of type, for indicating observer.
Optionally, it dishes out described in calling before notification function and further includes:Calling, which is dished out, notifies name function of word, receives and is passed to institute The parameter, is built into the object of a notification type, pair of the notification type by the parameter for stating notice name function of word of dishing out The attribute of elephant includes the name of notice, mark observer parameter, the information of notice.
Optionally, the traversal customized variable data array, getting the object that notice is transmitted is specially:Described in traversal Customized variable data array, matching object identical with the object of notice in the notification function of dishing out, if match at Work(then takes out the object.
When adding observer, each observer can be there are one name, the i.e. object name of observer.Establishment notifies previous As in the notice that can first add observer, and create other than notice name and information, the recipient that also notifies.Notice center After taking notice, the recipient notified in the notice can be taken out, then traverses variable data array, search matches and notifies recipient id Identical object objects, thus find and notify recipient.
S203, the object receive the notice.
The observer that notice receives is got, that is, after obtaining observer's object, the object can receive notice.In this hair Bright embodiment, the notice includes the predetermined function executed of observer, for example observer is allowed to change current page font color.
Optionally, the object reception notice is specially:The object is executing performSelector functions Afterwards, selector functions can be executed.PerformSelector functions are a kind of method of calling in IOS, can be passed to an object Message is passed, and without being stated in compiling.Inform that the observer corresponding to the object of taking-up should by performSelector The function of execution is carried out selector functions after the observer receives the instruction of predefined function to be executed, Selector functions are selection method to be executed in object, and similar dynamic function pointer, selector functions can connect The predetermined operation of notice is executed after notified incoming parameter.It is logical due to being certain to setting when being registered to notice Know observer and call back function, observer executes corresponding selector functions to be existed certainly, will not cause to collapse.
Embodiment three:
For ease of understanding, described embodiment according to fig. 2 will be implemented the present invention with an actual application below A kind of method of the internal realization process of acquisition notice in example is described:
Fig. 3 shows the specific implementation flow for the method for obtaining the internal realization process of notice, and details are as follows:
In S301, definition notice class, the name of this notice class is DYNotification, DYNotification classes after It holds in NSObject, generic attribute is added in notifying class, the attribute includes:(1) name of character string type, name indicate logical The name known;(2) the object properties object, object of id types indicate the observer of notice;(3) the notice letter of dictionary type UserInfo is ceased, userInfo indicates the information carried in the notice dished out, which is a dictionary.
Some basic building method initWithName are defined, the parameter which needs has the name of notice Name, object type notify observer, dictionary type notification information userInfo.After realizing constructed fuction, in this way Incoming parameter is made to save by constructed fuction.When creating notice, it is notice assignment to call constructed fuction.
In S302, a notice center is defined, DYNotificationCenter is named as.Defined in the notice center One sequence method realizes notice center basic function.
The notice center includes addition observer method addObserver, and addition observer's function is passed to parameter packet It includes:Observer (observer indicates observer), selector (indicate that observer responds the function that notice is adjusted back later ASelector), aName (name for indicating notice), anObject (spare parameter).When addObserver is notified ASelector can be allowed to respond the function after name.
In S303, the addition observer method of definition can be passed to parameter, after converting incoming parameter to model, storage Into customized variable data array observers, the model attributes are identical as the parameter in incoming addObserver methods, Model parameter can be encapsulated by the model of establishment.
In S304, heart definition, which is dished out, in the notification notifies name method postNotificationName, and this method is incoming Parameter includes:Name name, observer's object object, the notification information userInfo of notice.Above-mentioned parameter is configured to lead to Know the object of type, then calls postNotification functions.
Inside postNotification functions, the traversal to variable data array is set, takes out observer's object, i.e. S305 Specially:Traversal method enumerateObjectsUsingBlock, each observer's object, member can be got every time by traversing Element index index, traversal parameter stop is terminated.Above-mentioned ergodic process can find the transmission object of notice, i.e. observer.
In S306, after getting object, which is carried out performSelector functions, and there are two ginsengs for the function Number:First is the observer for needing to execute function, and second is the name of notice for needing to dish out.Then described to go to execute Selector functions, selector functions are to receive the function for needing to execute after notice, which executes the behaviour that notice carries It instructs.
Optionally, further include removing observer after S306.
The basic function at system default notice center may be implemented in notice center defined above, is added observer simultaneously It dishes out notice.
It should be understood that the size of the serial number of each step is not meant that the order of the execution order in above-described embodiment, each process Execution sequence should be determined by its function and internal logic, the implementation process without coping with the embodiment of the present invention constitutes any limit It is fixed.
Example IV:
A kind of method of specified operation switching realtime curve is essentially described above, a kind of acquisition will be notified below The terminal device of internal realization process is described in detail.
Fig. 4 shows one embodiment of the terminal device provided in an embodiment of the present invention for obtaining the internal realization process of notice Structure chart.
Memory module 41:For defining a notice center, when calling addition observer's method, by the incoming observation Parameter in person stores after being converted to model into customized variable data array.
Specifically, the parameter being passed in the observer includes:Observer, observer response after call back function, The name of notice, spare function.
Spider module 42:When for by the notice of the generation person that passes to target observations, calling is dished out notification function, and is traversed The customized variable data array obtains the object that the notice is transmitted, wherein the object is for identifying the target observations Person.
Optionally, the spider module 42 further includes structure module:For calling notice name function of word of dishing out, receive incoming The parameter, is built into the object of a notification type by the parameter of the notice name function of word of dishing out, the notification type The attribute of object includes the name of notice, mark observer parameter, the information of notice.
Specifically, the traversal customized variable data array, obtaining the object that the notice is transmitted is specially:Traversal The customized variable data array, matching object identical with the image parameter of notification function of dishing out, if match at Work(then takes out the object.
Receiving module 43:The notice is received for the object.
Specifically, the object reception notice is specially:The object is executing performSelector functions Afterwards, selector functions can be executed, to obtain the operational order for notifying to include.
Preferably, the terminal device for obtaining the internal realization process of notice further includes remove module, for removing observation Person.
Embodiment five:
Fig. 5 is the schematic diagram of the terminal device structure for the internal realization process of acquisition notice that one embodiment of the invention provides. The terminal device, to have the mobile computer device of touch screen, including but not limited to smart mobile phone, smartwatch, notes Sheet, tablet computer, POS machine even include vehicle-mounted computer.As shown in figure 4, the terminal device 5 of the embodiment includes:Memory 510, processor 520, the memory 510 include the storage program 5101 run thereon, and those skilled in the art can be with Understand, terminal device structure does not constitute the restriction to terminal device shown in Fig. 5, may include more more or less than illustrating Component, either combine certain components or different components arrangement.
Each component parts of terminal device is specifically introduced with reference to Fig. 5:
Memory 510 can be used for storing software program and module, and processor 520 is stored in memory 510 by operation Software program and module, to execute various function application and the data processing of terminal.Memory 510 can include mainly Storing program area and storage data field, wherein storing program area can storage program area, the application journey needed at least one function Sequence (such as sound-playing function, image player function etc.) etc.;Storage data field can be stored to be created according to using for terminal Data (such as audio data, phone directory etc.) etc..It, can be in addition, memory 510 may include high-speed random access memory Including nonvolatile memory, for example, at least a disk memory, flush memory device or other volatile solid-states Part.
On memory 510 program 5101 is run comprising obtain the method for realizing process inside notice, it is described to transport Line program 5101 can be divided into one or more module/units, and one or more of module/units are stored in described It in memory 510, and is executed by processor 520, with the transmission of completion notice and obtains notice realization process, it is one or more A module/unit can be the series of computation machine program instruction section that can complete specific function, and the instruction segment is for describing institute State implementation procedure of the computer program 5101 in the terminal device 5.For example, the computer program 5101 can be divided For memory module, spider module and receiving module.
Processor 520 is the control centre of terminal device, utilizes each of various interfaces and the entire terminal device of connection A part by running or execute the software program and/or module that are stored in memory 510, and calls and is stored in storage Data in device 510 execute the various functions and processing data of terminal, to carry out integral monitoring to terminal.Optionally, it handles Device 520 may include one or more processing units;Preferably, processor 520 can integrate application processor and modulation /demodulation processing Device, wherein the main processing operation system of application processor, user interface and application program etc., modem processor is mainly located Reason wireless communication.It is understood that above-mentioned modem processor can not also be integrated into processor 520.
Terminal device may also include at least one sensor, such as optical sensor, motion sensor and other sensors, A kind of input equipment, for example, touch screen, keyboard and other, a kind of output equipment, for example, loud speaker, display and other, other Details are not described herein for component parts.
In embodiments of the present invention, the program that runs of the execution of processor 520 included by the terminal is specially:
The method for obtaining the internal realization process of notice, which is characterized in that including:
A notice center is defined, when calling addition observer's method, the parameter in the observer will be passed to and converted At in storage to customized variable data array after model;When by the notice of the generation person that passes to target observations, calling is dished out notice Function, and the customized variable data array is traversed, the object that the notice is transmitted is obtained, wherein the object is for identifying institute The person that states target observations;The object receives the notice.
Further, the parameter being passed in the observer includes:Readjustment letter after observer, observer's response Number, the name of notice, spare function.
Further, described call before notification function of dishing out further includes:
Calling, which is dished out, notifies name function of word, the parameter of the incoming notice name function of word of dishing out is received, by the parameter structure Build up the object of a notification type, the attribute of the object of the notification type include the name of notice, mark observer parameter, The information of notice.
Further, the traversal customized variable data array, obtaining the object that the notice is transmitted is specially:
The customized variable data array is traversed, matching and the incoming image parameter of notification function of dishing out are identical right As if successful match, taking out the object.
Further, the object reception notice is specially:.
The object can execute selector functions after executing performSelector functions, to execute the notice Including operational order.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description, The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, is not described in detail or remembers in some embodiment The part of load may refer to the associated description of other embodiments.
Those of ordinary skill in the art may realize that each embodiment described in conjunction with the examples disclosed in this document Module, unit and/or method and step can be realized with the combination of electronic hardware or computer software and electronic hardware.This A little functions are implemented in hardware or software actually, depend on the specific application and design constraint of technical solution.Specially Industry technical staff can use different methods to achieve the described function each specific application, but this realization is not It is considered as beyond the scope of this invention.
In several embodiments provided herein, it should be understood that disclosed system, device and method can be with It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit It divides, only a kind of division of logic function, formula that in actual implementation, there may be another division manner, such as multiple units or component It can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, it is shown or The mutual coupling, direct-coupling or communication connection discussed can be the indirect coupling by some interfaces, device or unit It closes or communicates to connect, can be electrical, machinery or other forms.
The unit illustrated as separating component may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, you can be located at a place, or may be distributed over multiple In network element.Some or all of unit therein can be selected according to the actual needs to realize the mesh of this embodiment scheme 's.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, it can also It is that each unit physically exists alone, it can also be during two or more units be integrated in one unit.Above-mentioned integrated list The form that hardware had both may be used in member is realized, can also be realized in the form of SFU software functional unit.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product When, it can be stored in a computer read/write memory medium.Based on this understanding, the present invention realizes above-described embodiment side All or part of flow in method can also instruct relevant hardware to complete, the computer by computer program Program can be stored in a computer readable storage medium, and the computer program is when being executed by processor, it can be achieved that above-mentioned each The step of a embodiment of the method.Wherein, the computer program includes computer program code, the computer program code Can be source code form, object identification code form, executable file or certain intermediate forms etc..The computer-readable medium can To include:Can carry the computer program code any entity or device, recording medium, USB flash disk, mobile hard disk, magnetic disc, CD, computer storage, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium etc..It should be noted that the computer The content that readable medium includes can carry out increase and decrease appropriate according to legislation in jurisdiction and the requirement of patent practice, such as In certain jurisdictions, according to legislation and patent practice, computer-readable medium does not include electric carrier signal and telecommunication signal.
The above, the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although with reference to before Stating embodiment, invention is explained in detail, it will be understood by those of ordinary skill in the art that:It still can be to preceding The technical solution recorded in each embodiment is stated to modify or equivalent replacement of some of the technical features;And these Modification or replacement, the spirit and scope for various embodiments of the present invention technical solution that it does not separate the essence of the corresponding technical solution.

Claims (10)

1. a kind of method obtaining the internal realization process of notice, which is characterized in that including:
A notice center is defined, when calling addition observer's method, the parameter being passed in the observer is converted to mould After type in storage to customized variable data array;
When by the notice of the generation person that passes to target observations, calling is dished out notification function, and traverse it is described it is customized can parameter Group obtains the object that the notice is transmitted, wherein the object is for identifying the target observations person;
The object receives the notice.
2. according to the method described in claim 1, it is characterized in that, the parameter being passed in the observer includes:Observation Call back function, the name of notice, spare function after person, observer's response.
3. according to the method described in claim 1, further including before notification function it is characterized in that, the calling is dished out:
Calling, which is dished out, notifies name function of word, receives the parameter of the incoming notice name function of word of dishing out, the parameter is built into The attribute of the object of one notification type, the object of the notification type includes the name of notice, mark observer parameter, notice Information.
4. according to the method described in claim 1, it is characterized in that, the traversal customized variable data array, obtains institute Stating the object that notice is transmitted is specially:
The customized variable data array is traversed, object identical with the image parameter of notification function of dishing out is passed to is matched, If successful match, the object is taken out.
5. according to the method described in claim 1, it is characterized in that, the object reception notice is specially:
The object can execute selector functions after executing performSelector functions, include to complete the notice Operational order.
6. a kind of terminal device obtaining the internal realization process of notice, which is characterized in that including:
Memory module:For defining a notice center, when calling addition observer's method, will be passed in the observer Parameter stores after being converted to model into customized variable data array;
Spider module:When for by the notice of the generation person that passes to target observations, calling is dished out notification function, and traverse it is described from The variable data array of definition obtains the object that the notice is transmitted, wherein the object is for identifying the target observations person;
Execution module:The notice is received for the object.
7. terminal device according to claim 6, which is characterized in that the calling notification function of dishing out further includes:
Calling, which is dished out, notifies name function of word, receives the parameter of the incoming notice name function of word of dishing out, the parameter is built into The attribute of the object of one notification type, the object of the notification type includes the name of notice, mark observer parameter, notice Information.
8. terminal device according to claim 6, which is characterized in that the traversal customized variable data array takes It is specially to the object transmitted is notified:
The customized variable data array is traversed, object identical with the image parameter of notification function of dishing out is passed to is matched, If successful match, the object is taken out.
9. a kind of terminal device obtaining the internal realization process of notice, including memory, processor and it is stored in the storage In device and the computer program that can run on the processor, which is characterized in that the processor executes the computer journey The step of method that the internal realization process of notice is obtained as described in any one of claim 1 to 5 is realized when sequence.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, feature to exist In realization is obtained as described in any one of claim 1 to 5 when the computer program is executed by processor notifies internal realize The step of method of process.
CN201810238456.XA 2018-03-22 2018-03-22 Obtain method, terminal device and the storage medium of the internal realization process of notice Pending CN108762943A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810238456.XA CN108762943A (en) 2018-03-22 2018-03-22 Obtain method, terminal device and the storage medium of the internal realization process of notice

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810238456.XA CN108762943A (en) 2018-03-22 2018-03-22 Obtain method, terminal device and the storage medium of the internal realization process of notice

Publications (1)

Publication Number Publication Date
CN108762943A true CN108762943A (en) 2018-11-06

Family

ID=63980630

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810238456.XA Pending CN108762943A (en) 2018-03-22 2018-03-22 Obtain method, terminal device and the storage medium of the internal realization process of notice

Country Status (1)

Country Link
CN (1) CN108762943A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103838615A (en) * 2014-02-28 2014-06-04 广州华多网络科技有限公司 Strategy execution method, strategy execution device and strategy execution system
CN106250246A (en) * 2016-07-25 2016-12-21 福建天泉教育科技有限公司 A kind of method and system of event transmission
CN107515793A (en) * 2017-08-22 2017-12-26 四川长虹电器股份有限公司 A kind of module communication means for supporting message mechanism

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103838615A (en) * 2014-02-28 2014-06-04 广州华多网络科技有限公司 Strategy execution method, strategy execution device and strategy execution system
CN106250246A (en) * 2016-07-25 2016-12-21 福建天泉教育科技有限公司 A kind of method and system of event transmission
CN107515793A (en) * 2017-08-22 2017-12-26 四川长虹电器股份有限公司 A kind of module communication means for supporting message mechanism

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
逝水留恋: "IOS NSNotificationCenter(通知中心)实现原理", 《HTTPS://BLOG.CSDN.NET/M0_37182854/ARTICLE/DETAILS/78782724》 *

Similar Documents

Publication Publication Date Title
CN110247811A (en) A kind of alarm method and relevant apparatus of internet of things equipment
CN107453896A (en) Multiple sector chain network data processing method, device and server
CN109634598A (en) A kind of page display method, device, equipment and storage medium
CN103208046A (en) Workflow engine architecture method and system based on interactive dynamic flow diagram
CN110365536A (en) A kind of the fault cues method and relevant apparatus of internet of things equipment
CN107357639B (en) A kind of distributed processing system(DPS), data processing method and apparatus
CN109754072B (en) Processing method of network offline model, artificial intelligence processing device and related products
CN104714805B (en) A kind of method and device of the setting menu of control application program
CN106101169A (en) A kind of terminal and data reporting method
CN110825807B (en) Data interactive conversion method, device, equipment and medium based on artificial intelligence
CN108446327A (en) Operation system dynamic creation method, device, computer equipment and storage medium
CN113296871A (en) Method, equipment and system for processing container group instance
CN108924030A (en) Electronic device, the method for dynamically configuration message exhibition method and storage medium
CN108446371A (en) Data return guiding method, device, computer equipment and storage medium
CN108804100A (en) Create method, apparatus, storage medium and the mobile terminal of interface element
CN107888663A (en) A kind of method of distribution of document, equipment and computer-readable medium
CN108092784A (en) A kind of method, terminal and computer-readable medium for creating group
CN105302556B (en) Realize the method and system and server unit calculated
CN108762943A (en) Obtain method, terminal device and the storage medium of the internal realization process of notice
CN108536773A (en) A kind of auto alarm information integrating method, device, equipment and medium
CN104636135A (en) Node access method and system, client side agent and client side
CN115934076A (en) Cross-platform client micro-service providing device and method and electronic equipment
CN107220811B (en) Method and device for activating nodes in process
CN109918067A (en) Report Customization method, apparatus, client and storage medium
CN101222352B (en) Topological diagram indication method in telecommunication network guard system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20181106

RJ01 Rejection of invention patent application after publication