Requirements: such as the topic connected to the development of a piece of content
:
This situation exists in a cell in the TableView.
Points
1, the corresponding explanation to pop up in the visible area, and the small sharp angle to point to the picture
2, text cannot be too high with a maximum height then the text content can be scrolled (TextView)
3, the width of the dialog box is fixed to the overall UI width
4, the dialog is oriented by the position of the current click on screen 1/2 as a demarcation
5, because this click of the view is inside the cell so pop-up dialog box display to the top of the full screen of this trigger is the first response to the entire app so
The position of the currently known focus relative to the cell view requires further knowledge of the location relative to the UIWindow
Key code:
CGRect Rectintableview = [TableView rectforrowatindexpath:self.indexpath]; //Know the current cell Indexpath get the current cell (i.e. view) position relative to TableView
CGRect Rectinsuperview = [TableView convertrect:rectintableview toview:window]; //Get the location of the current cell (that is, view) relative to the UIWindow
6, in the same view there are two more than two click on the dialog box when you want to cancel the last click (cancel including delete/Hide all the layers of the Click dialog box) or the page will be confusing. If you click on the blank also default to cancel the click because the user may want to open another click event so this time to cancel the popup dialog box for the first response
Picture and text mixed in this is referred to in the paragraph for a while, the specific problem of course, but also specific analysis, such as if the current rich text needs to have a copy of the function of the paste??? What should I do with this?
Slowly, bread and milk will have, specific problems specific analysis it's here ending
IOS Click comment Icon popup corresponding explanation