for example, if a button becomes unavailable after it is clicked, it can not be clicked until the next day, so the button can only be clicked once a day, such as check-in, so how to update the status of the button at zero?
for example, if a button becomes unavailable after it is clicked, it can not be clicked until the next day, so the button can only be clicked once a day, such as check-in, so how to update the status of the button at zero?
I remember dealing with this kind of business logic when I was doing OA before:
1. Complicated approach: first, when entering the interface, call the server interface to obtain the server time (mobile phone time is not trusted), and then initialize the timer according to this time to judge the time difference between this time and 0 o'clock the next day. The timer keeps timing in the interface, and refreshes the interface at the specified time. If you enter the background and return to the front desk, you can refresh the server time. Reinitialize timer
2. Simple way to do this: receive UIApplicationSignificantTimeChangeNotification
notifications, which will be notified when a new day arrives or when the carrier time changes, but you don't know if you haven't used it.
Previous: Can nginx process the backend data before returning it?
Next: Why can't the esc,delete,end,insert key pop up the corresponding keycode value?
after collectionview adds a cell, but closes the APP, what do you want to do with the data source when you open the cell, and find that it has not been added? ...
CAShapeLayer plus UIBezierPath draws an oblique line. You can t click on it. Ask the boss for advice ...