CN115396546A - Conflict processing method and device for sliding event - Google Patents

Conflict processing method and device for sliding event Download PDF

Info

Publication number
CN115396546A
CN115396546A CN202210866495.0A CN202210866495A CN115396546A CN 115396546 A CN115396546 A CN 115396546A CN 202210866495 A CN202210866495 A CN 202210866495A CN 115396546 A CN115396546 A CN 115396546A
Authority
CN
China
Prior art keywords
sliding
view
main
auxiliary
sliding view
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.)
Granted
Application number
CN202210866495.0A
Other languages
Chinese (zh)
Other versions
CN115396546B (en
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.)
Shanghai Wanwu Xinsheng Environmental Technology Group Co
Original Assignee
Shanghai Wanwu Xinsheng Environmental Technology Group Co
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 Shanghai Wanwu Xinsheng Environmental Technology Group Co filed Critical Shanghai Wanwu Xinsheng Environmental Technology Group Co
Priority to CN202210866495.0A priority Critical patent/CN115396546B/en
Publication of CN115396546A publication Critical patent/CN115396546A/en
Application granted granted Critical
Publication of CN115396546B publication Critical patent/CN115396546B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72469User interfaces specially adapted for cordless or mobile telephones for operating the device by selecting functions from two or more displayed items, e.g. menus or icons
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72484User interfaces specially adapted for cordless or mobile telephones wherein functions are triggered by incoming communication events

Landscapes

  • Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application aims to provide a method and equipment for processing conflict of sliding events, and two classes are introduced; the sliding view manager and the sliding view are used for creating a main sliding view and assigning the main sliding view to the sliding view manager; creating one or more secondary sliding views corresponding to the main sliding view and assigning the secondary sliding views to a sliding view manager; the main/auxiliary sliding view judges whether the main/auxiliary sliding view stops sliding or not by calling back the sliding view proxy methods corresponding to the main/auxiliary sliding view respectively, if so, the sliding capability of the main/auxiliary sliding view is stopped by the sliding view manager, and meanwhile, the sliding capability of the auxiliary/main sliding view is started so as to enable the auxiliary/main sliding view to start sliding.

Description

Conflict processing method and device for sliding event
Technical Field
The present application relates to the field of application development technologies, and in particular, to a method and an apparatus for processing a conflict of a sliding event.
Background
At present, basic everyone in the society uses a smart phone, and the use of the smart phone is just to use an application program installed in the smart phone, namely, a well-known application program app. When using apps, the most frequent operation of the user is clicking and sliding according to the content provided by the apps. In the sliding operation, the content presented in the app can be slid by the user because an assembly for enabling the user to slide and browse the content is provided in an operating system (such as an iOS system) of the smartphone, the assembly is called a sliding view uiScrollView, a developer adds the content exceeding the height of the screen in the UIScrollView, and the UIScrollView can automatically slide up and down without excessive other operations, which is very convenient. But this is the case with only a single uiscrillview. In development, the situation that another UIScrollView is nested in the UIScrollView is frequently encountered, even three UIScrollViews are nested, so that the effect that the secondary titles which are frequently seen in Taobao and Jingdong apps are sucked and the secondary contents can be switched in a sliding mode from side to side is realized. This effect is roughly interactive as follows: the outer UIScrollView stops sliding when sliding upward for a certain distance, and then the inner UIScrollView starts sliding. In development, the inner UIScrollView does not slide continuously after the sliding of the outer UIScrollView is finished, or the sliding event is not smooth and has a pause phenomenon when being switched between the two UIScrollViews.
Most of the methods for solving the problem of the sliding event conflict in the prior art are large in code amount, difficult to read, difficult to understand, high in coupling degree and poor in expansibility, and are difficult to understand and master by a user due to the fact that a large amount of complex distances and logic calculation are carried out.
Disclosure of Invention
An object of the present application is to provide a method and an apparatus for processing a sliding event conflict, which solve the problems of complex computation, complex logic, high coupling and difficult expansion of a three-party library in the sliding event conflict problem in the prior art, and can switch between a main sliding view and an auxiliary sliding view skillfully through a sliding view manager, thereby avoiding the stagnation of the sliding view and improving the user experience.
According to an aspect of the present application, a method for handling a conflict of a sliding event is provided, wherein the method includes:
creating a main sliding view, and assigning the main sliding view to a sliding view manager;
creating one or more secondary sliding views corresponding to the primary sliding view, and assigning each secondary sliding view to the sliding view manager;
the main/auxiliary sliding view judges whether the main/auxiliary sliding view stops sliding or not by calling back the sliding view proxy method corresponding to each main/auxiliary sliding view,
if yes, stopping the sliding capability of the main/auxiliary sliding view through the sliding view manager, and simultaneously starting the sliding capability of the auxiliary/main sliding view so as to enable the auxiliary/main sliding view to start sliding.
Further, in the above method, the determining, by the primary/secondary sliding view, whether the primary/secondary sliding view stops sliding by recalling the sliding view proxy method corresponding to each of the primary/secondary sliding views, includes:
the main/auxiliary sliding view judges whether the sliding area of the main/auxiliary sliding view exceeds the corresponding preset sliding area by calling back the corresponding sliding view proxy method,
if yes, determining to stop the sliding capacity of the main/auxiliary sliding view;
if not, the sliding capacity of the main/auxiliary sliding view is maintained.
Further, in the above method, the stopping, by the sliding view manager, the sliding capability of the main/sub sliding view includes:
and the sliding view manager calls a sliding closing method to stop the sliding capacity of the main/auxiliary sliding view.
Further, in the above method, the type of the main/sub sliding view is a class with sliding control capability or a sub-class of the class with sliding control capability.
Further, in the above method, the method further includes:
adding two new attributes for the main/auxiliary sliding views respectively, namely a content offset attribute and a view slidable attribute at the last time;
the sliding view manager controls whether the main/sub sliding view is slidable through a view slidable attribute,
if so, recording the content offset of the current sliding of the main/auxiliary sliding view,
and if not, assigning the last content offset of the main/auxiliary sliding view to the currently sliding content offset so as to keep the view sliding position to the last sliding position.
According to another aspect of the present application, there is also provided a non-volatile storage medium having computer readable instructions stored thereon, which, when executed by a processor, cause the processor to implement the conflict handling method for a slip event as described above.
According to another aspect of the present application, there is also provided a collision processing apparatus for a sliding event, wherein the apparatus includes:
one or more processors;
a computer-readable medium for storing one or more computer-readable instructions,
when executed by the one or more processors, cause the one or more processors to implement a collision handling method for a slip event as described above.
Compared with the prior art, the method and the device introduce two classes of the sliding view manager and the sliding view, wherein the sliding view class comprises a main sliding view and one or more corresponding auxiliary sliding views, and in the process of conflict processing of the sliding event, the main sliding view is created and assigned to the sliding view manager; creating one or more secondary slide views corresponding to the primary slide view and assigning each secondary slide view to the slide view manager; the main/auxiliary sliding view judges whether the main/auxiliary sliding view stops sliding or not by calling back sliding view agent methods corresponding to the main/auxiliary sliding view respectively, if so, the sliding capability of the main/auxiliary sliding view is stopped by the sliding view manager, and meanwhile, the sliding capability of the auxiliary/main sliding view is opened so that the auxiliary/main sliding view starts sliding.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the detailed description of non-limiting embodiments made with reference to the following drawings:
FIG. 1 illustrates a flow diagram of a method for conflict handling for a slide event in accordance with an aspect of the subject application;
FIG. 2 is a diagram illustrating a relationship between a primary slide view and a secondary slide view in a method for conflict handling for slide events according to an aspect of the present application;
FIG. 3 illustrates a logical diagram between a primary slide view, a secondary slide view, and a slide view manager in a method of conflict handling for slide events according to an aspect of the subject application.
The same or similar reference numbers in the drawings identify the same or similar elements.
Detailed Description
The present application is described in further detail below with reference to the attached figures.
In a typical configuration of the present application, the terminal, the device serving the network, and the trusted party each include one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory computer readable media (transient media), such as modulated data signals and carrier waves.
As shown in fig. 1, one aspect of the present application provides a flowchart of a conflict handling method for a sliding event, where the method may be implemented by programming in a computer language swift, an operating system may include, but is not limited to, a system suitable for macOS, and a development tool may include, but is not limited to, an Xcode, where the method includes step S11, step S12, step S13, step S14, and step S15, and specifically includes the following steps:
step S11, creating a main sliding view, and assigning the main sliding view to a sliding view manager;
step S12, one or more auxiliary sliding views corresponding to the main sliding view are created, and each auxiliary sliding view is assigned to the sliding view manager;
here, the inside of the main sliding view may include one or more sub sliding views, and in a preferred embodiment of the present application, as shown in fig. 2, corresponding 3 sub sliding views, namely sub sliding views Tab1, tab2 and Tab3, may be created for the main sliding view. It should be noted that the types of the main sliding view and the sub sliding view in the present application are a class with sliding control capability (e.g., uisrolview) or a sub-class of the class with sliding control capability. If there are multiple slide views in the main slide view (i.e. if there are two or more sub-slide views), another container is needed to carry the sub-slide views, as in fig. 2, three sub-slide views are included in a large laterally sliding view.
And S13, judging whether the main/auxiliary sliding view stops sliding or not by calling back the sliding view proxy method corresponding to each main/auxiliary sliding view, if so, executing the step S14, and if not, keeping the sliding capability of the main/auxiliary sliding view.
And S14, stopping the sliding capability of the main/auxiliary sliding view through the sliding view manager, and simultaneously opening the sliding capability of the auxiliary/main sliding view so as to enable the auxiliary/main sliding view to start sliding.
Through the steps S11 to S14, the problems of complex calculation, complex logic, high coupling degree and difficult expansion of the three-party library in the sliding event conflict problem in the prior art are solved, and the main/auxiliary sliding views can be skillfully switched through the sliding view manager, so that the blockage is avoided, and the user experience is improved.
In step S11, creating a main sliding view and assigning the main sliding view to a sliding view manager, which can be implemented by the following codes:
lazy var tableView:FSPersonalCenterTV={
letv=FSPersonalCenterTV.init(frame:CGRect.init(x:0.v:0.width:view.bounds.width,heiaht:SCREEN HEIGHT))
v.backgroundColor=THEME_COLOR_PURPLE
v.delegate=self
v.dataSource=self
v.bounces=false
v.isScrollEnabled=false
return v
}()
create a Master scroll View, the type of Master scroll View must be FSPersonalCenterTV class or its subclass with the ability to control the slide
lazy var headerV:UIView={
let v=UIView.init(frame:CGRect.init(x:0,y:0,width:SCREEN_WIDTH,height:200))
return v
}()
lazy var footerV:FSPersnalCenterFooterV={
let v=FSPersnalCenterFooterV.init(frame:CGRect.init(x:0,y:0,width:SCREEN WIDTH,height:self.view.bounds.height-segmentV.bounds.height))
vdelegate=self
return v
}()
override func viewDidLoad){
super.viewDidLoad()
view.addSubview(tableView)
self.tableView.tableHeaderView=self.headerV
self.tableView.tableFooterView=self.footerV
// core code assigns Main scroll View to sliding View manager
FSPersonalCenterScrollerManager.sharedmainScroller=selftableView
}
In step S12, creating one or more secondary slide views corresponding to the primary slide view, and assigning each secondary slide view to the slide view manager, which may be implemented by the following codes:
lazy var t1:FSPersonalCenterTV={
let v=FSPersonalCenterTVinit(frame:selfboundsstyle:plain)
v.delegate=self
v.canScroll=true
return v
}()
create a secondary scroll view, the type of which must be FSPersonalCenterTV class or a subclass thereof with a sliding control capability.
lazy var t2:FSPersonalCenterTV={
let y=FSPersonalCenterTV.init(frame:self.bounds,style:.plain
v.frame.origin.x=self.bounds.width
v.dataSource=self
vdelegate=self
v.canScroll=true
return v
}()
lazy var t3:FSPersonalCenterTV={
letv=FSPersonalCenterTVinit(frame:selfboundsstyle:plain)
v.frame.origin.x=self.bounds.width*2
v.dataSource=self
v.delegate=self
v.canScroll=true
return v
}()
In this example, there are three secondary slide views Tab that can be switched, that is, there are three secondary slide views in the primary slide view, and in practical applications there may be one or more secondary slide views in the primary slide view.
override init(frame:CGRect){
super.init(frame:frame)
addSubview(container)
container.addSubview(t1)
container.addSubview(t2)
container.addSubview(t3)
container.contentSize=CGSize.init(width:frame.width*3,heiaht:frame.heiaht)children.append(t1)
children.append(t2)
children.append(t3)
// core code assigns Secondary sliding View to sliding View manager
FSPersonalCenterScrollerManaersharedviceScroller=t1
In the embodiment of the present application, an aspect of the present application proposes that a method for handling a conflict of a sliding event introduces two core classes, one is an inherited self-sliding view uisrolview class or a sub-class thereof, in the inherited self-sliding view uisrolview class, the class includes a main sliding view and one or more corresponding sub-sliding views, for each sliding view, two attributes are newly added for the main sliding view or the sub-sliding view, respectively a last content offset (lastContentOffset) attribute and a view slideable (canScroll) attribute, a content offset contentOffset method of the sliding view uiswitliv can be rewritten during the sliding process, and the sliding view manager controls whether the main/sub-sliding view is slideable through the view slideable (scroll) attribute, if so, records a content offset of the main/sub-sliding view currently sliding, and if not, assigns a last content offset of the main/sub-sliding view to a content of the current sliding, so as to keep the sliding offset position of the sliding view at the last sliding position. That is, if the main sliding view or the sub sliding view can slide, recording a content offset Contentoffset of the current sliding of the main sliding view or the sub sliding view; if the main or sub-slide view cannot be slid, the last content offset lastContentOffset in the slide view (main or sub-slide view) is assigned to the currently slid content offset contentOffset, which also ensures that the position of the view slide is maintained to the position of the last slide. In the inheritance self-sliding view UIScrollView class or the subclass thereof, a Gesture recognition UI Gesture Recognizer proxy method is further implemented, which is used for judging whether a sliding Gesture acts on the object (namely, a main sliding view or an auxiliary sliding view), if so, responding to the sliding Gesture event, and if so, not responding (for example, when the main sliding view has a plurality of auxiliary sliding views, the parent views of the auxiliary sliding views are containers, and if the object is a container, no response is needed); of course, when there is a secondary slide view in the primary slide view, no container is needed to carry the secondary slide view, that is, if there is only one secondary slide view uisrolview in the secondary page (i.e. there is no parent view: container), the gesture recognition proxy method does not need to be implemented. In a preferred embodiment of the present application, the specific implementation of the inheritance self-sliding view uisrolview class or the subclass thereof in the preferred embodiment can be implemented by the following codes:
Figure BDA0003759400570000091
Figure BDA0003759400570000101
in the following embodiments of the present application, an aspect of the present application provides a method for handling a sliding event conflict, in which two core classes are introduced, one class is an inheriting self-sliding-view uisrolview class or a subclass thereof, the other class is a sliding-view manager, inherits self-basic object NSObject, the sliding-view manager has two attributes, one is a main scrolling-view mainscroll, and the other is a sub-scrolling-view vicescscroll, and a function of the sliding-view manager is responsible for coordinating a sliding capability of the main/sub sliding views. The stopping of the sliding capability of the main/sub sliding view by the sliding view manager in step S14 specifically includes: and the sliding view manager calls a sliding closing method to stop the sliding capacity of the main/auxiliary sliding view. That is, the sliding view manager coordinates the switching between the main sliding view and the sub sliding view, which can be implemented by closing the sliding disabled scroll method, and the specific implementation can be implemented by the following codes:
import UIKit
// core class
class FSPersonalCenterScrollerManager{
weak var mainScroller:FSPersonalCenterTV?
weak var viceScroller:FSPersonalCenterTV?
Static let shared:FSPersonalCenterScrollerManager=FSPersonal CenterScroller Manager.init()
func disnableScroll(_scroller:UIScrollView)->Void{
if scroller is FsPersonalCenterTV{
let fstv=scroller as!FSPersonalCenterTV
if fsty==mainScroller{
viceScroller?.canScroll=true
}else if fstv==viceScroller{
mainScroller?.canScroll=true
fstv.contentoffset=.zero
}
fstv.canScroll=false
}
}
}
If the primary slide view is transmitted, the sliding capability of the secondary slide view is stopped, and if the secondary slide view is transmitted, the sliding capability of the primary slide view is stopped, namely, only one of the primary/secondary slide views has the sliding capability, so that the sliding conflict between the primary slide view and the secondary slide view is avoided.
Next to the foregoing embodiment of the present application, the step S13 of determining whether the main/sub sliding view stops sliding by recalling the sliding view proxy method corresponding to each main/sub sliding view specifically includes:
the main/auxiliary sliding view judges whether the sliding area of the main/auxiliary sliding view exceeds the corresponding preset sliding area by calling back the corresponding sliding view proxy method,
if yes, determining to stop the sliding capacity of the main/auxiliary sliding view;
if not, the sliding capacity of the main/auxiliary sliding view is maintained.
Aiming at a main sliding view, judging whether a sliding area of the main sliding view exceeds a preset sliding area corresponding to the main sliding view or not by a sliding view proxy method corresponding to the main sliding view by the main sliding view, and if so, determining to stop the sliding capacity of the main sliding view; if not, the sliding capacity of the main sliding view is maintained. For example, the height of the screen drawn by the main sliding view exceeds the head height of the screen itself, the scrolling capability of the main sliding view is stopped, the sliding view manager is told to stop the sliding capability of the main sliding view, the sliding view manager stops the sliding capability of the main sliding view, and the sliding capability of the secondary sliding view in the main sliding view is opened, so that the secondary sliding view starts sliding, and the specific implementation can be realized by the following codes:
core code
func scrollviewDidScroll(scrollView:UIScrollView){
//print(scrollView.contentoffset.y)
if scrollview.contentOffset.y>=self.headerV.bounds.height{
scrollView.contentOffset=CGPoint.init(x:0,y:self.headerV.bounds.height)FSPersonalCenterScrollerManagershareddisnableScroll(scrollView)}
}
}
}
For an auxiliary sliding view, judging whether a sliding area of the auxiliary sliding view exceeds a preset sliding area corresponding to the auxiliary sliding view by a sliding view agent method corresponding to the auxiliary sliding view in a back-up mode, and if so, determining to stop the sliding capacity of the auxiliary sliding view; if not, the sliding capacity of the secondary sliding view is maintained. For example, when the secondary slide view slides upwards to the top (i.e. the content offset of the secondary slide view is content offset. Y < = 0), the scrolling capability of the secondary slide view is stopped, and the slide view manager is told to stop the sliding capability of the secondary slide view, the slide view manager will stop the sliding capability of the secondary slide view, and open the sliding capability of the primary slide view to which the secondary slide view belongs, so as to start sliding the primary slide view, and the specific implementation can be implemented by the following codes:
// core code
func scrollviewDidScroll(_scrollView:UIScrollView){
if scrollview is FsPersonalCenterTV{
let fs=scrollView as!FSPersonalCenterTv
let main=FSPersonalCenterScrollerManaersharedmainScroller
if fs.contentoffset.y<=0{
main!isScrollEnabled=true;
FSPersonalCenterScrollerManaer.shareddisnableScroll(scrollView)
}
}
}
In a preferred embodiment of the present application, the main sliding view includes three sub sliding views, that is, there are three sub sliding views tab in the example of fig. 2, and after the sub sliding views tab are switched, the corresponding sub sliding views are assigned to the sliding view manager, so as to ensure that the sub sliding views displayed in the current screen are consistent with the sliding view manager.
The overall idea of code implementation in the embodiment of the present application may be summarized as follows: the main/auxiliary sliding view realizes the coordination of sliding events through the manager so as to switch the main sliding view or the auxiliary sliding view, the main/auxiliary sliding view determines whether the sliding capability of the main/auxiliary sliding view is stopped through the sliding view manager according to the sliding position of the main/auxiliary sliding view, the sliding view manager controls the sliding capability of the opposite auxiliary/main sliding view to be opened, and the main/auxiliary sliding view has no authority to control the sliding capability of the main/auxiliary sliding view, wherein the logic train of thought among the main sliding view, the auxiliary sliding view and the sliding view manager is shown in fig. 3.
According to another aspect of the present application, there is also provided a non-volatile storage medium having computer readable instructions stored thereon, which, when executed by a processor, cause the processor to implement the collision handling method of the above-described slipping event.
According to another aspect of the present application, there is also provided a collision processing device for a sliding event, wherein the device includes:
one or more processors;
a computer-readable medium for storing one or more computer-readable instructions,
when executed by the one or more processors, cause the one or more processors to implement a collision handling method as described above for a sliding event.
Here, for details of each embodiment in the collision processing device for a sliding event, reference may be specifically made to corresponding parts of the embodiment of the collision processing method for a sliding event, and details are not described here again.
In summary, the present application introduces two classes, a sliding view manager and a sliding view, where the sliding view class includes a main sliding view and one or more corresponding secondary sliding views, and during a collision processing process of a sliding event, the main sliding view is created and assigned to the sliding view manager; creating one or more secondary slide views corresponding to the primary slide view and assigning each secondary slide view to the slide view manager; the main/auxiliary sliding view judges whether the main/auxiliary sliding view stops sliding or not by calling back sliding view proxy methods corresponding to the main/auxiliary sliding view respectively, if so, the sliding capability of the main/auxiliary sliding view is stopped by the sliding view manager, and meanwhile, the sliding capability of the auxiliary/main sliding view is started so that the auxiliary/main sliding view starts sliding.
It should be noted that the present application may be implemented in software and/or a combination of software and hardware, for example, implemented using Application Specific Integrated Circuits (ASICs), general purpose computers or any other similar hardware devices. In one embodiment, the software programs of the present application may be executed by a processor to implement the steps or functions described above. Likewise, the software programs (including associated data structures) of the present application may be stored in a computer readable recording medium, such as RAM memory, magnetic or optical drive or diskette and the like. Additionally, some of the steps or functions of the present application may be implemented in hardware, for example, as circuitry that cooperates with the processor to perform various steps or functions.
In addition, some of the present application may be implemented as a computer program product, such as computer program instructions, which when executed by a computer, may invoke or provide methods and/or techniques in accordance with the present application through the operation of the computer. Program instructions which invoke the methods of the present application may be stored on a fixed or removable recording medium and/or transmitted via a data stream on a broadcast or other signal bearing medium and/or stored in a working memory of a computer device operating in accordance with the program instructions. An embodiment according to the present application comprises an apparatus comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein the computer program instructions, when executed by the processor, trigger the apparatus to perform a method and/or a solution according to the aforementioned embodiments of the present application.
It will be evident to those skilled in the art that the present application is not limited to the details of the foregoing illustrative embodiments, and that the present application may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the application being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned. Furthermore, it will be obvious that the term "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the apparatus claims may also be implemented by one unit or means in software or hardware. The terms first, second, etc. are used to denote names, but not to denote any particular order.

Claims (7)

1. A method for collision handling of a sliding event, wherein the method comprises:
creating a main sliding view, and assigning the main sliding view to a sliding view manager;
creating one or more secondary slide views corresponding to the primary slide view, and assigning each secondary slide view to the slide view manager;
the main/auxiliary sliding view judges whether the main/auxiliary sliding view stops sliding or not by calling back the sliding view proxy method corresponding to each main/auxiliary sliding view,
if yes, stopping the sliding capability of the main/auxiliary sliding view through the sliding view manager, and simultaneously starting the sliding capability of the auxiliary/main sliding view so as to enable the auxiliary/main sliding view to start sliding.
2. The method of claim 1, wherein the determining whether the main/sub sliding view stops sliding by recalling the sliding view proxy method corresponding to each main/sub sliding view comprises:
the main/auxiliary sliding view judges whether the sliding area of the main/auxiliary sliding view exceeds the corresponding preset sliding area by calling back the corresponding sliding view proxy method,
if yes, determining to stop the sliding capacity of the main/auxiliary sliding view;
if not, the sliding capacity of the main/auxiliary sliding view is maintained.
3. The method of claim 1, wherein said ceasing, by the sliding view manager, sliding capabilities of the primary/secondary sliding view comprises:
and the sliding view manager calls a sliding closing method to stop the sliding capacity of the main/auxiliary sliding view.
4. The method of claim 1, wherein the type of the primary/secondary slide view is a slide control capable class or a subclass of the slide control capable class.
5. The method of any of claims 1 to 4, wherein the method further comprises:
adding two new attributes for each main/auxiliary sliding view, namely a content offset attribute and a view slidable attribute at the last time respectively;
the sliding view manager controls whether the main/sub sliding view is slidable through a view slidable attribute,
if so, recording the content offset of the current sliding of the main/auxiliary sliding view,
and if not, assigning the last content offset of the main/auxiliary sliding view to the currently sliding content offset so as to keep the view sliding position to the last sliding position.
6. A non-transitory storage medium having stored thereon computer readable instructions which, when executed by a processor, cause the processor to implement the method of any one of claims 1 to 5.
7. A collision handling device for a sliding event, wherein the device comprises:
one or more processors;
a computer-readable medium for storing one or more computer-readable instructions,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-5.
CN202210866495.0A 2022-07-22 2022-07-22 Conflict processing method and device for sliding event Active CN115396546B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210866495.0A CN115396546B (en) 2022-07-22 2022-07-22 Conflict processing method and device for sliding event

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210866495.0A CN115396546B (en) 2022-07-22 2022-07-22 Conflict processing method and device for sliding event

Publications (2)

Publication Number Publication Date
CN115396546A true CN115396546A (en) 2022-11-25
CN115396546B CN115396546B (en) 2023-10-27

Family

ID=84117694

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210866495.0A Active CN115396546B (en) 2022-07-22 2022-07-22 Conflict processing method and device for sliding event

Country Status (1)

Country Link
CN (1) CN115396546B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014153728A (en) * 2013-02-04 2014-08-25 Panasonic Liquid Crystal Display Co Ltd Information processing device and method for correcting operation position information
US20150179226A1 (en) * 2013-12-20 2015-06-25 Opentv, Inc. Multiple views recording
CN204833117U (en) * 2015-08-07 2015-12-02 广东粤林电气科技股份有限公司 HDD exempts from to lock quick -witted case
US20180374057A1 (en) * 2017-06-22 2018-12-27 Microsoft Technology Licensing, Llc Interaction with and visualization of conflicting calendar events
CN110175023A (en) * 2019-05-28 2019-08-27 四川长虹电器股份有限公司 Method and system based on the multistage nested linkage of the UIScrollView in iOS system
CN111427498A (en) * 2019-01-09 2020-07-17 成都鼎桥通信技术有限公司 Interface pushing method and device based on off-screen fingerprint
CN113660904A (en) * 2019-05-01 2021-11-16 T.J.史密夫及内修有限公司 Communication and user interface control in a user activity monitoring system
CN114281222A (en) * 2021-12-15 2022-04-05 贵阳语玩科技有限公司 iOS-based multi-view level management method, system and construction method
CN114428657A (en) * 2022-01-11 2022-05-03 上海万物新生环保科技集团有限公司 Sliding method and equipment based on Taro framework at H5 end
CN114528517A (en) * 2022-02-08 2022-05-24 北京沃东天骏信息技术有限公司 View processing method and device, electronic equipment and computer readable medium
WO2022110425A1 (en) * 2020-11-27 2022-06-02 上海上讯信息技术股份有限公司 Snapshot-based master-slave architecture deployment method and device

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014153728A (en) * 2013-02-04 2014-08-25 Panasonic Liquid Crystal Display Co Ltd Information processing device and method for correcting operation position information
US20150179226A1 (en) * 2013-12-20 2015-06-25 Opentv, Inc. Multiple views recording
CN204833117U (en) * 2015-08-07 2015-12-02 广东粤林电气科技股份有限公司 HDD exempts from to lock quick -witted case
US20180374057A1 (en) * 2017-06-22 2018-12-27 Microsoft Technology Licensing, Llc Interaction with and visualization of conflicting calendar events
CN111427498A (en) * 2019-01-09 2020-07-17 成都鼎桥通信技术有限公司 Interface pushing method and device based on off-screen fingerprint
CN113660904A (en) * 2019-05-01 2021-11-16 T.J.史密夫及内修有限公司 Communication and user interface control in a user activity monitoring system
CN110175023A (en) * 2019-05-28 2019-08-27 四川长虹电器股份有限公司 Method and system based on the multistage nested linkage of the UIScrollView in iOS system
WO2022110425A1 (en) * 2020-11-27 2022-06-02 上海上讯信息技术股份有限公司 Snapshot-based master-slave architecture deployment method and device
CN114281222A (en) * 2021-12-15 2022-04-05 贵阳语玩科技有限公司 iOS-based multi-view level management method, system and construction method
CN114428657A (en) * 2022-01-11 2022-05-03 上海万物新生环保科技集团有限公司 Sliding method and equipment based on Taro framework at H5 end
CN114528517A (en) * 2022-02-08 2022-05-24 北京沃东天骏信息技术有限公司 View processing method and device, electronic equipment and computer readable medium

Also Published As

Publication number Publication date
CN115396546B (en) 2023-10-27

Similar Documents

Publication Publication Date Title
US8817053B2 (en) Methods and systems for opening a file
US7411590B1 (en) Multimedia file format
US20090079744A1 (en) Animating objects using a declarative animation scheme
US9513783B1 (en) Determining available screen area
US20110265027A1 (en) Collapsible tabbed user interface
US7567257B2 (en) Partition-based undo of partitioned object graph
WO2018130085A1 (en) Method and apparatus for page presentation
US20080148221A1 (en) Dynamic multi-context delta view for merging structured data in a visual merge tool
US11410701B2 (en) Systems and methods for direct video retouching for text, strokes and images
WO2019011141A1 (en) Startup and configuration method, apparatus and device, medium, and operating system
CN105723314B (en) Two-step content selection
CN110727825A (en) Animation playing control method, device, server and storage medium
CN109799945B (en) Method and device for scrolling and displaying long list of small programs, electronic equipment and storage medium
CN111897607A (en) Application interface loading and interaction method, device and storage medium
CN115396546A (en) Conflict processing method and device for sliding event
CN107621951B (en) View level optimization method and device
US20240179368A1 (en) Video processing method for application, and electronic device
US20230198861A1 (en) A group node editing method and apparatus
CN109814778B (en) Method and device for realizing small program tab, electronic equipment and medium
US8538917B2 (en) System and method for file coordination
WO2020135129A1 (en) Method and device for loading plug-in of application, and terminal
CN113992876A (en) Method for recording document and playing video, storage medium and terminal
CN106557587B (en) Method and system for storing and displaying webpage picture and corresponding text
CN106570032B (en) Method and device for controlling webpage
US11573687B2 (en) Screenshot method and apparatus for information interaction interface, computing device and storage medium

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
GR01 Patent grant
GR01 Patent grant