CN114911475A - Multi-channel frame bouncing method and device - Google Patents

Multi-channel frame bouncing method and device Download PDF

Info

Publication number
CN114911475A
CN114911475A CN202110176688.9A CN202110176688A CN114911475A CN 114911475 A CN114911475 A CN 114911475A CN 202110176688 A CN202110176688 A CN 202110176688A CN 114911475 A CN114911475 A CN 114911475A
Authority
CN
China
Prior art keywords
target
pop
frame
parameter
bullet
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
CN202110176688.9A
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 CN202110176688.9A priority Critical patent/CN114911475A/en
Publication of CN114911475A publication Critical patent/CN114911475A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces

Abstract

The invention discloses a multichannel elastic frame method and a multichannel elastic frame device, wherein the multichannel elastic frame device comprises: the bullet frame storage module is used for generating a bullet frame dictionary; parameters of the bullet frame are stored in the bullet frame dictionary; the parent view construction module is used for generating a target array based on a popup frame for display and constructing a parent view based on the target array and the popup frame dictionary; the view adding module is used for adding the parent view to a target interface; the bullet frame judging module is used for judging whether the target interface needs to pop up a target bullet frame or not; wherein the target pop-up box is any one or more pop-up boxes of the layout in the parent view; and the pop-up module is used for popping up the target pop-up frame on the target interface based on the parent view when the target interface needs to pop up the target pop-up frame. The embodiment of the invention can realize that a plurality of elastic frames are added at the primary end and the RN end simultaneously, can realize the covering, the repetition and the repeated display of the elastic frames, and improves the development efficiency.

Description

Multi-channel frame bouncing method and device
Technical Field
The invention relates to the technical field of live video, in particular to a multichannel frame popping method and device.
Background
In the technical field of live broadcasting, a live broadcasting client needs to be developed, a popup frame needs to be popped up in a live broadcasting room in project development, the popup frame needs to be popped up in the live broadcasting room, and the popup frame is a relatively special popup frame which can be called by an RN (read Native) end and can also be called by a Native source. However, the current pop-up frame does not support the simultaneous pop-up of multiple pop-up frames, so the existing pop-up frame implementation scheme cannot be well adapted to the current application requirements.
Disclosure of Invention
In view of the above problems, the present invention provides a multi-channel elastic frame method and device, which can realize simultaneous addition of multiple elastic frames at the primary end and the RN end, and can realize covering, repetition and multiple display of the elastic frames, thereby improving development efficiency.
In a first aspect, the present application provides the following technical solutions through an embodiment:
a multi-channel magazine assembly comprising:
the bullet frame storage module is used for generating a bullet frame dictionary; parameters of the bullet frame are stored in the bullet frame dictionary; the parent view construction module is used for generating a target array based on a popup frame for display and constructing a parent view based on the target array and the popup frame dictionary; the view adding module is used for adding the parent view to a target interface; the bullet frame judging module is used for judging whether the target interface needs to pop up a target bullet frame or not; wherein the target pop-up box is any one or more pop-up boxes of the layout in the parent view; and the pop-up module is used for popping up the target pop-up frame on the target interface based on the parent view when the target interface needs to pop up the target pop-up frame.
Optionally, the bullet frame storage module includes:
the first judging unit is used for judging whether a target container class exists or not; and the container creating unit is used for creating the target container class and obtaining the bullet frame dictionary when the target container class does not exist.
Optionally, the parent view building module includes:
the initialization unit is used for setting the number of the pop frames in the parent view and the number of the components of the parent view; the layout unit is used for acquiring the key value of the popup frame for display when the components of the father view are updated; storing the key value to the target array based on a preset bullet frame display sequence; based on the key value and the bullet box dictionary, laying out bullet boxes in the parent view; and the gesture adding unit is used for adding a gesture to the bullet box which is laid out in the parent view based on a method [ current addGestutureRecognizer: pan ].
Optionally, the view adding module is specifically configured to:
the parent view is added to the target interface by the [ self.
Optionally, the frame popping judgment module includes:
a marking unit for acquiring a marking bit; the parameter transmitting unit is used for acquiring a parameter dictionary corresponding to the mark bit; the parameter dictionary is transmitted from the RN end; the second judging unit is used for judging whether the parameter dictionary is matched with the bullet frame dictionary or not; and the animation acquisition unit is used for acquiring the display animation of the target bullet frame corresponding to the marking bit when the parameter dictionary is matched with the bullet frame dictionary.
Optionally, the pop-up frame module includes:
the pop-up unit is used for popping up the target pop-up frame from a preset position of the target interface based on the parent view; and the animation display unit is used for displaying the display animation in the target bullet frame popped up from the preset position.
Optionally, the pop-up unit is specifically configured to pop up the target pop-up frame from the preset position of the target interface based on a function showativyviewwithrecognized; the function showActiviewWithrecognized comprises a first parameter, a second parameter, a third parameter and a fourth parameter, wherein the first parameter is used for indicating whether the target bullet frame needs animation, the second parameter is used for indicating whether the target bullet frame is a horizontal screen, the third parameter is used for indicating a parameter which needs to be added to the target bullet frame, and the fourth parameter is used for indicating the size of the target bullet frame.
In a second aspect, based on the same inventive concept, the present application provides the following technical solutions through an embodiment:
a multi-channel bounding box method comprising:
acquiring a bullet frame dictionary; parameters of the bullet frame are stored in the bullet frame dictionary; generating a target array based on the pop-up box for display, and constructing a parent view based on the target array and the pop-up box dictionary; adding the parent view to a target interface; judging whether the target interface needs to pop up a target pop frame or not; wherein the target pop-up box is any one or more pop-up boxes of the layout in the parent view; and when the target interface needs to pop up the target pop-up frame, popping up the target pop-up frame on the target interface based on the parent view.
Optionally, the constructing a parent view based on the bounding box dictionary and the parameters of the bounding box includes:
setting the number of pop-up boxes in a parent view and the number of components of the parent view; when the component of the parent view is updated, acquiring a key value of a popup box for display; storing the key value to the target array based on a preset bullet frame display sequence; based on the key value and the bullet box dictionary, laying out bullet boxes in the parent view; based on the [ current addGestutureRecognizer: pan ] method, a gesture is added to the bullet box laid out in the parent view.
Optionally, when the target interface needs to pop up a pop-up frame, popping up the pop-up frame on the target interface, including:
popping a target pop-up frame from a preset position of the target interface based on a function showActiviewWithAnimated; the function showActiviewWithrecognized comprises a first parameter, a second parameter, a third parameter and a fourth parameter, wherein the first parameter is used for indicating whether the target bullet frame needs animation, the second parameter is used for indicating whether the target bullet frame is a horizontal screen, the third parameter is used for indicating a parameter to be added to the target bullet frame, and the fourth parameter is used for indicating the size of the target bullet frame.
According to the multichannel bullet frame device provided by the embodiment of the invention, the bullet frame dictionary is generated through the bullet frame storage module, so that the multichannel foundation can be realized, and the realization of the bullet frames of both the primary end and the RN end can be ensured; then, after determining a pop-up box for display, a parent view construction module produces a corresponding target array, and then constructs a parent view based on the target array and the pop-up box dictionary; therefore, the target array realizes the popup frame queuing of the parent view, and further realizes direct covering, repetition and repeated display. Furthermore, the view adding module is used for adding the parent view to the target interface, so that the pop-up frame in the parent view is displayed on the target interface, and synchronous display of a plurality of live rooms can be supported. Finally, a pop frame judging module, configured to judge whether a target pop frame needs to pop up from a target interface, where the target pop frame is any one or more pop frames laid out in the parent view; and the pop-up frame module is used for popping up the target pop-up frame on the target interface based on the parent view when the target interface needs to pop up the target pop-up frame, so that pop-up of the pop-up frame and animation display of the pop-up frame are realized. Therefore, the multi-channel bullet frame device in the embodiment of the invention can realize the simultaneous addition of a plurality of bullet frames at the primary end and the RN end, can realize the covering, the repetition and the multiple display of the bullet frames, and improves the development efficiency.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the description below are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts. In the drawings:
fig. 1 is a schematic structural diagram of a multichannel elastic frame device provided by a first embodiment of the invention;
fig. 2 shows a flowchart of a multi-channel bounding box method according to a second embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
First embodiment
Referring to fig. 1, fig. 1 is a schematic structural diagram illustrating a multi-channel elastic frame device 300 according to a first embodiment of the present invention. The multi-channel magazine device 300 includes: the pop-up frame storage module 301, the parent view construction module 302, the view adding module 303, the pop-up frame judgment module 304, and the pop-up frame module 305 are described in detail below with respect to specific implementations of the above modules and functional relationships among the modules.
A bullet frame storage module 301, configured to generate a bullet frame dictionary; the bullet frame dictionary stores parameters of a bullet frame. Specifically, the pop-up frame storage module 301 includes a first determining unit, configured to determine whether a target container class exists; and the container creating unit is used for creating the target container class and obtaining the bullet frame dictionary when the target container class does not exist. Specific examples in this embodiment are as follows:
in the embodiment, the bullet frame is realized through multi-level management, the multi-level management can be realized through a container class, and various view method classes can be contained in the container class. The method for implementing the container class specifically comprises the following steps: - (NSDictionary) containerClasses, the method of the container class includes registration of various native hierarchies and js hierarchies, and the containerClasses is a customized container name. The container registered by the container class method may be understood as a box dictionary in which various boxes may be stored, and parameters of the boxes in the box dictionary are composed of key values and value values, where each key value is a file name of a created hierarchy, and each value is a class name of the created hierarchy, and the following styles are implemented: @ is @ (DYACTYTICYComponentTypeMutTypeMuticover), wherein DYACTYTICYNECTYNECTYNECTYNECTOUCoCoveris is the filename of the hierarchy, [ DYACTYTICyMuticCoverContainer class ] is the class name of the hierarchy, and a DYACTYTICComponentType type is added inside the view of the control hierarchy to define a type for the view of the hierarchy. Therefore, the function of the container creation unit can be realized by the above example to create the target container, and obtain the pop-up box dictionary. Further, in order to avoid repeatedly constructing the target container class, in this embodiment, the first determining unit may first determine whether the target container class "container Classes" exists, and when the target container class "container Classes" does not exist, the container creating unit creates a target container class to obtain the bullet box dictionary.
In this embodiment, the bullet box storage module 301 may serve as a basis for implementing multiple channels, and the setting here may be ensured at a native end (native end) and an RN end. In the absence of the foregoing pop-up box storage module 301, adding multiple pop-up boxes and views at the same time cannot be realized, that is, a multi-channel pop-up box cannot be realized.
And a parent view construction module 302, configured to generate a target array based on the pop frame for display, and construct a parent view based on the target array and the pop frame dictionary. Specifically, the parent view building module 302 includes: the initialization unit is used for setting the number of the pop-up boxes in the parent view and the number of the components of the parent view; the layout unit is used for acquiring the key value of the popup box for display when the component of the parent view is updated; storing the key value to the target array based on a preset bullet frame display sequence; based on the key value and the bounding box dictionary, bounding boxes are laid out in the parent view. Thereby realizing the queuing function of the popup box in the parent view. The following examples are provided in this embodiment:
the number of the pop-up boxes in the parent view can be determined through an initialization method, namely, an initialization method is created, the initialization method is called when the class starts to be constructed, and the number of the pop-up boxes which can be displayed is set in the initialization method. For example, an init method may be constructed, which is if (self) and may be expressed as self. Furthermore, the number of the components of the set parent view can be updated by a method of defining the view layout, and the data of the components can be the same as the number of the pop-up boxes. For example, view layout is implemented by the layout currentviews method; when the component layout in the parent view is updated, the layout function of layout currentviews can be called, and when the layout function is executed, the following process is carried out:
first, all the pop-ups of the current parent view, i.e., the pop-ups that can be shown on the parent view, are acquired. And then, storing the displayable popup frames of the parent view through an array, wherein the key values corresponding to the popup frames can be stored during storage. When the pop-up box needs to be displayed on the parent view, the first object in the array is acquired, and then the corresponding pop-up box is acquired through the key value. If different popup frames need to be displayed, different key values can be taken from the array to obtain different popup frames.
For example, all the boxes in the parent view are obtained by the method NSArray topview keys [ -self getCurrentDisplayViews: self. Wherein getCurrentDisplayViews indicates that all the frames are acquired, self. Further, if a bullet box is to be displayed in the parent view, the corresponding bullet box can be acquired in the bullet box dictionary through the key value in the array. For example, the first object in the array may be taken by the method NSString _ currentKey [ [ topViewKeys firstObject ] ]; the currentKey is a key value corresponding to the acquired current bullet frame. Then, using the key value of the current bullet frame to obtain the corresponding bullet frame through a method UIView current [ [ self. The alloview info indicates that displayable marbles and key values corresponding to the marbles are stored, that is, the marbles dictionary in this embodiment is stored, and UIView current indicates that the corresponding marbles are obtained through the key values of the current marbles, so that the current marbles are displayed in the parent view.
Further, in this implementation, a gesture adding unit may be compatibly configured in the parent view building module 302, and is configured to add a gesture to a box arranged in the parent view, so as to implement a method for internally processing a gesture. Specifically, the implementation process of the gesture adding unit specifically includes: by adopting the method UIPANGesturre recognizers pan [ [ UIPANGesturre recognizers alloc ] initwittTarget: self action: nil ], the gesture can be added to the corresponding bullet frame; the UIPanGesturecognizer alloc represents that a gesture is created, and self represents that an agent is set for the added gesture, namely the gesture is a current object; finally, adding the gesture in the bullet box is accomplished by adding the gesture above the current view by the [ current addGestutureRecognizer: pan ] method. Therefore, the internal processing gesture can be added in the parent view, and the elastic frames of the RN end and the original end can be flexibly finished.
In this embodiment, the parent view building module 302 may be used to queue pop-up boxes, so as to display any pop-up box that needs to be displayed in the parent view. In the implementation, the gesture is added through the gesture adding unit, so that the processing of the gesture is realized, and the gesture adding unit can be used for finishing the pop frames of the RN end and the original end.
And a view adding module 303, configured to add the parent view to the target interface. The target interface can be a screen interface of a mobile phone, a desktop of a computer, a video interface and the like. Specifically, the view adding module 303 may further determine whether the target interface has a capability of adding a view before adding the parent view to the target interface. For example, in the view adding module 303, after the parent view is constructed, the hidden attribute of the current bounding box may be set to no, then the size value of the bounding box is set, and whether the interface of the current bounding box that needs to be displayed has the capability of adding a view is further determined; if yes, the current pop-up frame is laid out on the container interface. In this embodiment, the size value of the current frame may be set by a method self. After the placement of the container interface is completed, the placed bullet box may be added to the target interface. Specifically, the parent view is added to the target interface by a method [ self.
Therefore, in the embodiment, the popup frame is added to the target interface by being laid out in the container interface, and the container interface is displayed in a plurality of live broadcast rooms, so that the popup frame can be displayed in a plurality of target interfaces.
A pop frame judgment module 304, configured to judge whether the target interface needs to pop up a target pop frame; wherein the target pop-up box is any one or more pop-up boxes laid out in the parent view. In the foregoing module, since the layout of the bullet box has already been completed. Whether the pop-up frame needs to be displayed or not can be judged, namely when the pop-up frame needs to be displayed, an animation view can be added at the position of the layout of the pop-up frame. The judgment of whether the frame needs to be popped can be completed by judging whether the animation is needed. Specifically, the frame popping judging module 304 may include: a marking unit for acquiring a marking bit; the parameter transmitting unit is used for acquiring a parameter dictionary corresponding to the mark bit; wherein, the parameter dictionary is transmitted from the RN end; the second judging unit is used for judging whether the parameter dictionary is matched with the bullet frame dictionary or not; and the animation obtaining unit is used for obtaining the display animation of the target bullet frame corresponding to the marking bit when the parameter dictionary is matched with the bullet frame dictionary.
For example, in this embodiment, a determination function for determining whether animation is required may be defined, where the determination function specifically includes: - (BOOL) needeamidatforcurrentView (UIView) currentView, wherein needeamidadforcurrentView is a function name, (UIView) currentView is a parameter required by the function, and currentView is a parameter of the judgment function, namely the current View. Specifically, a flag bit boul activated ═ NO is defined, a flag bit of the RN end code is defined, NSString ═ targetKey ═ @ new activated ". After the flag bit is obtained through NSString @ "connected identified", the frame dictionary imported by the RN side may be obtained through nsdirective ═ currentview. Then, the type of the parameter dictionary is judged, and the judging method is as follows: if ([ extraInfo isKindOfClass: [ NSDictionary class ] ]). If the type is correct, matching with the bullet frame dictionary can extract the parameter whether the animation is needed from the extraInfo through the method bAnimated [ [ extraInfo objectForKey: targetKey ] bolValue ], and determine the display animation of the target bullet frame corresponding to the marking bit.
The above-mentioned pop-up frame judging module 304 can realize the bridge function of animation display in multiple channels and multiple levels, and complete the pop-up frame display at both ends of the RN end and the primary end.
And the pop-up frame module 305 is configured to pop up the target pop-up frame on the target interface based on the parent view when the target interface needs to pop up the target pop-up frame. Specifically, in this embodiment, the elastic frame module 305 includes: the pop-up unit is used for popping up a pop-up frame from a preset position of a target interface based on the parent view; and the animation display unit is used for displaying the display animation in the target bullet frame popped up at the preset position. Since the parent view has been added to the preset position of the target interface and the determination of whether to pop up the target pop-up frame is completed, the target pop-up frame may be displayed at this time. Specifically, the pop frame can be popped out from a preset position of the target interface based on a function showActiviyViewWithAnimated; the function showActiviewWithrecognized comprises a first parameter, a second parameter, a third parameter and a fourth parameter, wherein the first parameter is used for indicating whether a target bullet frame needs animation, the second parameter is used for indicating whether the target bullet frame is a horizontal screen, the third parameter is used for indicating the parameter that the target bullet frame needs to be added, and the fourth parameter is used for indicating the size of the target bullet frame. For example, the pop-up unit and the animation display unit can be implemented by executing a function showActiviewWithAnimated. Specifically, the function is implemented by the following process: the direction of the screen is judged firstly, and if the screen is a horizontal screen, a popup frame can be drawn from the right side of the screen. The initial position of the current frame for popping can be determined by a method actView, frame ═ cgrecatntfix (kscreenwidth notfix,0, size, width, size, height), and then a block is set, specifically [ actView mas _ remakeConstraints ^ e ] { make. make. size. mas _ equialto (size); position constraint is carried out on the actView view (popup frame), the rightmost side of the actView constraint is modified into the rightmost side of the parent view of the actView, the width and the height of the view are the same as those of the original view, but the view needs to be reset. Further, an animation is added to the actView view, wherein animation is the animation that is finally performed. Through the method, the popup frame can pop up on the target interface, and animation is added and displayed for the popup frame. In addition, the above processes are only exemplary descriptions, and the above implementation processes can also be referred to in the vertical screen display.
In this embodiment, by arranging the foregoing elastic frame module 305, multi-channel and multi-level elastic frames can be made to be compatible with animation functions, which can reduce development workload and improve development efficiency.
In summary, in the multi-channel pop frame device 300 provided in this embodiment, the pop frame dictionary is generated by the pop frame storage module 301, so that a multi-channel basis can be ensured, and both the native terminal and the RN terminal can be ensured to pop frames; then, after determining the pop-up box for display, the parent view construction module 302 produces a corresponding target array, and then constructs a parent view based on the target array and the pop-up box dictionary; therefore, the target array is used for realizing the queuing of the bullet frames of the parent view, and further realizing direct covering, repetition and multiple display. Besides, an internal processing gesture can be integrated in the parent view, and the internal processing gesture can be used for ending the pop-up boxes of the RN end and the original end. Further, the view adding module 303 is configured to add the parent view to the target interface, so that the pop-up box in the parent view is displayed on the target interface, and synchronous display of multiple live broadcast rooms can be supported. Finally, the pop-up frame determining module 304 is configured to determine whether the target interface needs to pop up a target pop-up frame, where the target pop-up frame is any one or more pop-up frames laid out in the parent view; and the pop-up frame module 305 is configured to pop up the target pop-up frame on the target interface based on the parent view when the target interface needs to pop up the target pop-up frame, so that pop-up of the pop-up frame and animation display of the pop-up frame are achieved. Therefore, in the multi-channel elastic frame device 300 in this embodiment, multiple elastic frames can be simultaneously added to the original end and the RN end, and the elastic frames can be covered, repeated and displayed for multiple times, so that the development efficiency is improved.
Second embodiment
Based on the same inventive concept, a second embodiment of the invention provides a multi-channel elastic frame method. Fig. 2 shows a flowchart of a multi-channel bounding box method according to a second embodiment of the present invention.
The multichannel elastic frame method specifically comprises the following steps:
step S10: acquiring a bullet frame dictionary; the bullet frame dictionary stores parameters of bullet frames.
In step S10, the acquiring the bullet box dictionary may include: it is determined whether a target container exists. For example, the target container in this embodiment is a container classes. The frame-flipping dictionary stores parameters of the frame-flipping. Specifically, the specific examples in this embodiment are as follows:
in the embodiment, the bullet frame is realized through multi-level management, the multi-level management can be realized through a container class, and various view method classes can be contained in the container class. The method for implementing the container class specifically comprises the following steps: - (NSDictionary) container classes, which are custom container names, and the method of the container class includes registration of various native hierarchies and js hierarchies. The container registered by the container class method may be understood as a box dictionary in which various boxes may be stored, and parameters of the boxes in the box dictionary are composed of key values and value values, where each key value is a file name of a created hierarchy, and each value is a class name of the created hierarchy, and the following styles are implemented: @ is @ (DYACTYTICYComponentTypeMutTypeMuticover), wherein DYACTYTICYNECTYNECTYNECTYNECTOUCoCoveris is the filename of the hierarchy, [ DYACTYTICyMuticCoverContainer class ] is the class name of the hierarchy, and a DYACTYTICComponentType type is added inside the view of the control hierarchy to define a type interface for the view of the hierarchy. Therefore, creating a target container, obtaining a bullet box dictionary, may be achieved by the above example. Further, in order to avoid repeatedly constructing the target container class, in this embodiment, it may also be determined whether the target container class "container Classes" exists first, and when the target container class "container Classes" does not exist, a target container class is created, and a bounding box dictionary is obtained.
In this embodiment, the created bounding box dictionary can be used as a basis for implementing multiple channels, and the arrangement here can ensure mortgage at native end (native end) and RN. In the absence of the foregoing bullet frame dictionary, it is impossible to add multiple bullet frames and views simultaneously, that is, it is impossible to realize a multi-channel bullet frame.
Step S20: and generating a target array based on the bullet box for display, and constructing a parent view based on the target array and the bullet box dictionary.
In step S20, the specific process of constructing the parent view is to set the number of the pop-up boxes in the parent view and the number of the components of the parent view; and when the component of the parent view is updated, the popup box in the parent view is laid out. The process of laying out the popup box in the parent view may include: and laying out the bullet boxes in the parent view based on the layout currentviews method. After the layout is completed, gestures can be added to the bullet boxes which are laid out in the parent view, and compatibility of gesture addition is achieved. The following examples are provided in this embodiment:
the number of the pop-up boxes in the parent view can be determined through an initialization method, namely, an initialization method is created, the initialization method is called when the class starts to be constructed, and the number of the pop-up boxes which can be displayed is set in the initialization method. For example, an init method may be constructed, which is if (self) and may be expressed as self. Furthermore, the number of the components of the set parent view can be updated by a method for defining view layout, and the data of the components can be the same as the number of the pop-up boxes. For example, the view layout is implemented by the layout currentviews method; when the component layout in the parent view is updated, the layout function of layout current views may be called, and when executed in particular, the following process is performed:
first, the key value of the box for presentation, i.e. the box that can be presented on the parent view, is obtained. Then, storing the key value into a target array based on a preset bullet frame display sequence; based on the key value and the bullet box dictionary, the bullet boxes are laid out in the parent view. When the pop-up box needs to be displayed on the parent view, the first object in the array is acquired, and then the corresponding pop-up box is acquired through the key value. If different popup frames need to be displayed, different key values can be taken from the array to obtain different popup frames, and therefore the queuing function of the popup frames in the parent view is achieved.
For example, all the boxes in the parent view are obtained by the method NSArray topview keys [ -self getCurrentDisplayViews: self. Wherein getCurrentDisplayViews indicates that all the frames are acquired, self. Further, if a pop frame is to be displayed in the parent view, the corresponding pop frame can be acquired in the pop frame dictionary through the key value in the array. For example, the first object in the array may be taken by the method NSString _ currentKey [ [ topViewKeys firstObject ] ]; the currentKey is a key value corresponding to the acquired current bullet frame. Then, using the key value of the current bullet frame to obtain the corresponding bullet frame through a method UIView current [ [ self. The alloviewinfo represents that displayable marquees and key values corresponding to the marquees are stored, that is, the marquee dictionary in this embodiment, and the UIView current represents that the corresponding marquee is obtained through the key values of the current marquee, so that the current marquee is displayed in the parent view.
Further in this implementation, a gesture can also be added to the bullet box laid out in the parent view to implement a method for internally processing the gesture. Specifically, the gesture addition implementation process specifically includes: by adopting the method UIPANGesturre recognizers pan [ [ UIPANGesturre recognizers alloc ] initwittTarget: self action: nil ], the gesture can be added to the corresponding bullet frame; the UIPanGesturecognizer alloc represents that a gesture is created, and self represents that an agent is set for the added gesture, namely the gesture is a current object; finally, adding the gesture in the bullet box is accomplished by adding the gesture above the current view by the [ current addGestutureRecognizer: pan ] method. Therefore, the internal processing gesture can be added in the parent view, and the elastic frames of the RN end and the original end can be flexibly finished.
In the embodiment, due to the fact that the parent view is constructed, the queuing of the pop-up boxes can be achieved, and any pop-up box needing to be displayed can be displayed in the parent view. In the implementation, the processing compatibility of the gesture is realized through gesture addition, and the method can be used for ending the elastic frames of the RN end and the original end.
Step S30: adding the parent view to the target interface.
In step S30, the target interface may be a screen interface of a mobile phone, a desktop of a computer, a video interface, etc. Specifically, before executing step S30, it may be determined whether the target interface has the ability to add views. For example, after the parent view is constructed, the hidden attribute of the current bounding box may be set to no, then the size value of the bounding box is set, and whether the interface of the bounding box that needs to be displayed currently has the ability to add a view is further determined; if yes, laying out the current pop frame on the container interface. In this embodiment, the size value of the current frame may be set by a method self. After the placement of the container interface is completed, the placed bullet box may be added to the target interface. Specifically, the addition of the bullet frame on the target interface is completed through a method [ self.
Therefore, in the embodiment, the popup frame is added to the target interface by being laid out in the container interface, and the container interface is displayed in a plurality of live broadcast rooms, so that the popup frame can be displayed in a plurality of target interfaces.
Step S40: judging whether a target interface needs to pop up a target pop frame or not; wherein the target pop-up box is any one or more pop-up boxes of the layout in the parent view.
In step S40, since the layout of the bullet box has already been completed in the foregoing step. Whether the bullet frame is needed to be judged when the display is needed, namely when the target bullet frame needs to be popped up, an animation view can be added at the position of the bullet frame layout. The judgment of whether the frame needs to be popped can be completed by judging whether the animation is needed. Specifically, step S40 may include: acquiring a mark bit; acquiring a parameter dictionary corresponding to the mark bit; wherein, the parameter dictionary is transmitted from the RN end; judging whether the parameter dictionary is matched with the bullet frame dictionary or not; and when the parameter dictionary is matched with the bullet frame dictionary, obtaining the display animation of the target bullet frame corresponding to the mark bit.
For example, in this embodiment, a determination function for determining whether animation is required may be defined, where the determination function specifically includes: - (BOOL) needeamidatedForcurrentView (UIView) currentView, wherein currentView is a parameter of the predicate function. Specifically, a marker bit boul bound ═ NO is defined, a marker bit of a code at RN end is defined, NSString ═ targetKey ═ @ "needanated". After the flag bit is obtained through NSString @ "connected identified", the frame dictionary imported by the RN side may be obtained through nsdirective ═ currentview. Then, the type of the parameter dictionary is judged, and the judging method is as follows: if ([ extraInfo isKindOfClass: [ NSDictionary class ] ]). If the type is correct, matching with the bullet frame dictionary can take out the parameter whether the animation is needed or not from the extraInfo through the method of bianimated [ [ extraInfo objectForKey: targetKey ] bolvalue ], and determine the display animation of the target bullet frame corresponding to the marking bit.
Through the step S40, the bridge function of animation display can be realized in multiple channels and multiple levels, and the bullet frame display of the RN end and the primary end can be completed.
Step S50: and when the target interface needs to pop up the target pop-up frame, popping up the target pop-up frame on the target interface based on the parent view.
In step S50, the method may specifically include: popping up a popup frame from a preset position of a target interface based on the parent view; and displaying the display animation in the target bullet frame popped up at a preset position. Since the parent view has been added to the preset position of the target interface and the determination of whether to pop up the target pop-up frame is completed, the target pop-up frame may be displayed at this time. Specifically, the implementation mode can be as follows: popping up a popup frame from a preset position of a target interface based on a function showActivieWWithAnimated; the function showActiviewWithrecognized comprises a first parameter, a second parameter, a third parameter and a fourth parameter, wherein the first parameter is used for indicating whether a target bullet frame needs animation, the second parameter is used for indicating whether the target bullet frame is a horizontal screen, the third parameter is used for indicating the parameter that the target bullet frame needs to be added, and the fourth parameter is used for indicating the size of the target bullet frame. For example, the pop-up box and animation display process can be implemented by executing the function showActiviewWithAnimated. Specifically, the function is implemented by the following process: the direction of the screen is judged firstly, and if the screen is a horizontal screen, a popup frame can be drawn from the right side of the screen. The initial position of the current bullet frame for popping can be determined by a method actView.frame ═ CGRectMake (kScannenWidthNotFix, 0, size. width, size. height), and then a block is set, wherein the block is specifically [ actView Mas _ remakeConstrainents ^ MASconstraintMaker { make.right.equalto (actView. superview); make. size. mas _ equialto (size); position constraint is carried out on the actView view (popup frame), the rightmost side of the actView constraint is modified into the rightmost side of the parent view of the actView, the width and the height of the view are the same as those of the original view, but the view needs to be reset. Further, an animation is added to the actView view, wherein animation is the animation that is ultimately performed. Through the method, the popup frame can pop up on the target interface, and animation is added and displayed for the popup frame. In addition, the above processes are only exemplary descriptions, and the above implementation processes can also be referred to in the vertical screen display.
In this embodiment, through step S50, multi-channel and multi-level popup frames can be compatible with animation functions, which can reduce development workload and improve development efficiency.
It should be noted that, the embodiment of the present invention provides a multi-channel bounding box method, wherein the specific implementation and the generated technical effect of each step are the same as those of the foregoing device embodiment, and the method of each step in this embodiment can be implemented by the module and unit in the first embodiment. For a brief description, the corresponding contents in the foregoing method embodiments may be referred to where not mentioned in part in this embodiment.
Third embodiment
Based on the same inventive concept, a third embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored, and the program, when executed by a processor, implements the functions of the respective modules in the first aspect.
It should be noted that, in the computer-readable storage medium provided by the embodiment of the present invention, the technical effects produced by the implementation of the functions of the modules when the program is executed by the processor are the same as those of the foregoing apparatus and method embodiment, and for a brief description, corresponding contents in the foregoing method embodiment may be referred to for the non-mentioned points of the embodiment.
The term "and/or" appearing herein is merely one type of associative relationship that describes an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship; the word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means can be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including the preferred embodiment and all changes and modifications that fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (10)

1. A multichannel bullet frame device which characterized in that includes:
the bullet frame storage module is used for generating a bullet frame dictionary; parameters of the bullet frame are stored in the bullet frame dictionary;
the parent view construction module is used for generating a target array based on a popup frame for display and constructing a parent view based on the target array and the popup frame dictionary;
the view adding module is used for adding the parent view to a target interface;
the bullet frame judging module is used for judging whether the target interface needs to pop up a target bullet frame or not; wherein the target pop-up box is any one or more pop-up boxes of the layout in the parent view;
and the pop frame module is used for popping up the target pop frame on the target interface based on the parent view when the target interface needs to pop up the target pop frame.
2. The apparatus of claim 1, wherein the magazine storage module comprises:
the first judging unit is used for judging whether a target container class exists or not;
and the container creating unit is used for creating the target container class and obtaining the bullet frame dictionary when the target container class does not exist.
3. The apparatus of claim 1, wherein the parent view building module comprises:
the initialization unit is used for setting the number of the pop-up boxes in the parent view and setting the number of the components of the parent view;
the layout unit is used for acquiring the key value of the popup frame for display when the components of the father view are updated; storing the key value to the target array based on a preset popup frame display sequence; laying out a bounding box in the parent view based on the key value and the bounding box dictionary;
and a gesture adding unit for adding a gesture to the bullet box laid out in the parent view based on a method [ current addGestutureRecognizer: pan ].
4. The apparatus according to claim 1, wherein the view adding module is specifically configured to:
the parent view is added to the target interface by the [ self.
5. The apparatus of claim 1, wherein the pop frame determination module comprises:
a marking unit for acquiring a marking bit;
the parameter transmitting unit is used for acquiring a parameter dictionary corresponding to the mark bit; the parameter dictionary is transmitted from the RN end;
the second judging unit is used for judging whether the parameter dictionary is matched with the bullet frame dictionary or not;
and the animation obtaining unit is used for obtaining the display animation of the target bullet frame corresponding to the marking bit when the parameter dictionary is matched with the bullet frame dictionary.
6. The apparatus of claim 5, wherein the bezel module comprises:
the pop-up unit is used for popping up the target pop-up frame from a preset position of the target interface based on the parent view;
and the animation display unit is used for displaying the display animation in the target bullet frame popped up from the preset position.
7. The apparatus according to claim 6, wherein the pop-up unit is specifically configured to pop up the target pop-up frame from a preset position of the target interface based on a function showActiviyViewWithAnimated; the function showActiviewWithrecognized comprises a first parameter, a second parameter, a third parameter and a fourth parameter, wherein the first parameter is used for indicating whether the target bullet frame needs animation, the second parameter is used for indicating whether the target bullet frame is a horizontal screen, the third parameter is used for indicating a parameter which needs to be added to the target bullet frame, and the fourth parameter is used for indicating the size of the target bullet frame.
8. A multi-channel frame popping method, comprising:
acquiring a bullet frame dictionary; parameters of the bullet frame are stored in the bullet frame dictionary;
generating a target array based on the pop-up box for display, and constructing a parent view based on the target array and the pop-up box dictionary;
adding the parent view to a target interface;
judging whether the target interface needs to pop up a target pop frame or not; wherein the target pop-up box is any one or more pop-up boxes of the layout in the parent view;
and when the target interface needs to pop up the target pop-up box, popping up the target pop-up box on the target interface based on the parent view.
9. The method of claim 8, wherein constructing the parent view based on the bounding box dictionary and the bounding box parameters comprises:
setting the number of pop-up boxes in a parent view and the number of components of the parent view;
when the component of the parent view is updated, acquiring a key value of a popup box for display;
storing the key value to the target array based on a preset bullet frame display sequence;
based on the key value and the bullet box dictionary, laying out bullet boxes in the parent view;
based on the [ current addGestutureRecognizer: pan ] method, a gesture is added to a bullet box laid out in the parent view.
10. The method of claim 8, wherein popping up the pop-up box on the target interface when the target interface needs to pop up the pop-up box comprises:
popping a target pop frame from a preset position of the target interface based on a function showActivieWWithAnimated; the function showActiviewWithrecognized comprises a first parameter, a second parameter, a third parameter and a fourth parameter, wherein the first parameter is used for indicating whether the target bullet frame needs animation, the second parameter is used for indicating whether the target bullet frame is a horizontal screen, the third parameter is used for indicating a parameter to be added to the target bullet frame, and the fourth parameter is used for indicating the size of the target bullet frame.
CN202110176688.9A 2021-02-09 2021-02-09 Multi-channel frame bouncing method and device Pending CN114911475A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110176688.9A CN114911475A (en) 2021-02-09 2021-02-09 Multi-channel frame bouncing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110176688.9A CN114911475A (en) 2021-02-09 2021-02-09 Multi-channel frame bouncing method and device

Publications (1)

Publication Number Publication Date
CN114911475A true CN114911475A (en) 2022-08-16

Family

ID=82761059

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110176688.9A Pending CN114911475A (en) 2021-02-09 2021-02-09 Multi-channel frame bouncing method and device

Country Status (1)

Country Link
CN (1) CN114911475A (en)

Similar Documents

Publication Publication Date Title
US20100287529A1 (en) Systems and Methods for Generating Multimedia Applications
EP2321723B1 (en) Automatic user interface generation for entity interaction
CN109074246A (en) The system and method for automatically determining layout constraint
US20140245196A1 (en) User interface generation and preview
WO2016054549A1 (en) Application prototyping tool
US11449314B2 (en) Rapid application development method
US9836441B2 (en) Platform abstraction of graphics
CN110619554A (en) House resource display method, device, equipment and storage medium
CN111857878B (en) Skeleton screen page generation method and device, electronic equipment and storage medium
JP4750464B2 (en) Building design support device and building design support program
WO2023159595A1 (en) Method and device for constructing and configuring three-dimensional space scene model, and computer program product
Lee Beginning IOS 5 Application Development
CN112783660A (en) Resource processing method and device in virtual scene and electronic equipment
CN102142004B (en) Service processing method and service engine
WO2021035552A1 (en) System and method supporting graphical programming based on neuron blocks, and storage medium
CN114911475A (en) Multi-channel frame bouncing method and device
Gill Using React Native for mobile software development
CN114637937A (en) Page display method and device, electronic equipment and computer readable storage medium
US20120042268A1 (en) Processing user interfaces
CN114489619A (en) Interface view display method, terminal equipment and computer readable storage medium
CN109960771B (en) Advertisement display method
CN114443022A (en) Method for generating page building block and electronic equipment
CN114419194A (en) Method for generating collocation image and electronic equipment
CN107808050B (en) Weak current panel design system, design method and electronic equipment
CN111913776A (en) Content display method, device and equipment

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