简体   繁体   中英

How to update a label text every day so that the user gets another predefined text every day?

I am trying to do a simple application but I am very new to Xcode and Swift.

I am trying to do an application that has the following functions:

  • one text
  • one picture
  • one button

By pressing the button the text changes into another text, the picture into another picture and the button disappears. All these items must be predefined.

For now, I have one text, one picture, and one button. When I press the button, everything works. The picture changes, the text too, and the button disappears.

Now, how can I update those items every day?

And is it possible to make the button disappear until the next new updated text is shown?

What I mean is that once you pressed the button the first picture will not be shown anymore but it will stuck on the second picture until the new updated text and picture comes out?

Ok so what you can do is,

  1. When user opens your app, you can call a service and check whether you have updated text. If you get response, you can unhide the button and on click of it you can change the data.
  2. Whenever your data gets updated, you can send a silent push notification to your app and store that data. And the next time user opens your app, you can check the data and unhide Button if data is present.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM