iOS ui--Doodle Artboard instance

Source: Internet
Author: User
Tags event listener

The first is to build the framework

Other skipped, direct display effect:

Then upload and build two controller framework of the source Baidu cloud download Link: http://pan.baidu.com/s/1skjpDox password: ARDX, the project and I spent a good long time to get the icon material OH.

Then in the canvasview of the custom inheritance UIView:

Then the effect is:

Because of the logic above, each redraw will erase the previous trace. The solution, then, is to store each created path through a strongly referenced mutable array index, and then draw the array to iterate over it, drawing all the paths.

Effect:

Now that you need to work with the Patteleviewcontroller settings brush properties, you need to pass the data over two controllers, then use the memo pattern and the encapsulated framework (Http://www.cnblogs.com/goodboy-heyang /p/5041523.html), because of time, do not tidy up the details of the notes, really too much time, here I lazy, direct upload dynamic: <github on the fastcoding framework download link: https://github.com/ Nicklockwood/fastcoding> Source code Baidu cloud Download Link: http://pan.baidu.com/s/1kUdwtDl Password: p81d Because you want to experience a custom sandboxmanager that directly encapsulates the sandbox access and operation before you, see how fast it loads.  And I also set the background color of the toolbar: here to use the encapsulated Sandboxmanager source code Baidu Cloud Link: Http://pan.baidu.com/s/1qWTcKEC Password: Z8QD Here is the key code that loads the state of the local data recovery object: The state of the stored object: the state of the restored object: In fact, the above method is blind toss, also can not be regarded as a blind toss, for the future development encountered new needs to provide a new alternative, then then to the optimal method,   Since there are modal directly with all the methods and properties modal, Key code: Link: http://pan.baidu.com/s/1sk2S8mp Password: Vtun This source code optimization is neat and elegant. The next step is to add the Undo feature to the other item for toolbar: Here you need to add a business logic: in order to draw a clear array of undo operations: Set the Trash Delete icon Event Listener: Save to System album method: This part of the source code, you can directly copy the use:View Code

Then I had a whim to put in a good transition animation from a fancy Apple package. When I click on the Trash icon to delete the current artboard, according to the previous code we also know that there will be pop-up Uiactionsheet prompt box, click OK will certainly trigger the empty function, but I would like to be emptied before the function of a page, as if the previous pages turned over.

About transition animation Here is not tired, you can Baidu Google, or refer to my blog note: http://www.cnblogs.com/goodboy-heyang/p/5044018.html

Project Backup to date Baidu cloud download link: Http://pan.baidu.com/s/1o7kbQYI Password: k224

Look at the effect of the operation

iOS ui--Doodle Artboard instance

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.