This is a demo that mimics the screensaver program on the Apple retail store prototype. You can view the demo video of this software on YouTube. And you can download it on GitHub.

Requirements

Installation

If you want to run this project on your iPhone, you have to prepare for a Mac and have Xcode installed.

Usage

There is no special way to use it. If you don’t want to play with your phone, you can open this app and enjoy the animation. It’s also easy to exit the animation, press…


Photo by Jeremy Bishop on Unsplash

Apple has been launching SwiftUI for a while, and I’m also learning about SwiftUI and benefiting a lot.

Some time ago, I have been learning about list. I learned about the details of how SwiftUI handles List by learning the video of WWDC19. But it is a pity that WWDC videos only provide a way to slide the delete cell, but what I want to achieve is to delete the cell by clicking a button on the cell.

Obviously, the method of sliding to delete a cell is suitable for the table views that their cell’s height is not too…


Chinese version -> Here

Table views have always been the most popular guests for many apps. In fact, more than 90% of the software has a tabular view. Numerous UI designers like to add images to the table view, such as the most popular Twitter and Instagram.

It’s good to use the image in the table view, but it will bring a problem. The image loading time is longer than other content. If the image loading process is placed in the main thread, it will cause the table view to appear unsmooth when sliding.

Table of Contents


一直以来,表格视图是很多app最欢迎的客人。实际上,有超过90%的软件里面带有表格视图。无数的UI设计师喜欢在表格视图上面添加花里胡哨的 图片 ,比如最常用的TwitterInstagram

在表格里面使用图片固然好,但是就会带来一个问题,图片加载时间相比上其他内容要来的长,如果将图片加载这个过程放在主线程里面会导致表格视图滑动的时候卡顿。

懒人目录

加载图片的项目

我们来试试看在主线程里面加载图片。

打开你的 Xcode ,创建一个新的项目, 选择single view app这个选项, 给你的项目命名为LazyLoadImage

接着打开你的故事面板(Main.storyboard),删除掉预先创建好的view con …


Photo by Kevin Bhagat on Unsplash

If you want to read the English version, tap this link.

当我们使用TextField控件时,存在一个自然的问题 “如何在用户完成输入后关闭键盘”。显然,这个问题在iPad上有更好的解决方案,因为iPad提供了一个关闭键盘的按钮。


Photo by Kevin Bhagat on Unsplash

When we use the TextField control, there is a natural problem with “how to turn off the keyboard after the user has finished typing.” Obviously, this problem has a better solution on the iPad, because the iPad provides a button to turn off the keyboard.


Photo by Émile Perron on Unsplash

I think, not everyone knows that Xcode has a button that sets the priority of the constraint.

To be honest, I also learned the concept of “priority of constraints” recently. At that time I was talking about some functions of constraint with a professor. Inadvertently we talked about the priority of the constraint. I was confused, I had no idea what he was talking about, and he was also surprised that I didn’t know the concept.

When we set constraints on some controls, we can set the priority of these constraints. Just click on these constraints in the Attribute Inspector


Photo by Anthony Cantin on Unsplash

Introduce

The animation is a very important element in the development of software, and at the same time animation can make the user experience more perfect. Recently I tried to develop my first Cocoa Touch Framework — “HReminder”. it’s similar to the button that Medium uses it to remind readers to “Start from the beginning”.


Photo by Dawid Zawiła on Unsplash

General

HReminder is a Cocoa Touch framework and manages button displayed at the top of the screen. It is especially well suited as a small tag to remind users about something.

It has an interface similar to the button displayed by Medium which Medium app uses this button to reminder reader to ‘Start from beginning’. It now supports both the iPhone and the iPad.

Here are some screenshots showing what you can build with HReminder.


Photo by Patrick Ward on Unsplash

我的设备是Macbook Pro (3-inch, 2017, Two Thunderbolt 3 ports),256G SSD。最近开始有些存储压力了,倒不是没有内存了,只是看到系统占用的内存达到83.6GB,觉得很吃惊,于是开始清理内存。用Clean My Mac清理一部分旧文件后,决定对Xcode动手。

清空时间机器的备份

一般情况下清空时间机器的备份可以释放很多内存,如果你有一个2T的硬盘,你可以用时间机器直接备份到那个硬盘上面。如果没有,你可以试试我的方法。

sudo tmutil listlocalsnapshots /
tmutil deletelocalsnapshots 备份日期

清空Xcode内存

后记

参考文章:Xcode磁盘空间大清理

joker hook

👨‍🎓/study communication engineering🛠/love iOS development💻/🐶🌤🍽🏸🏫

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store