How iOS refreshes what's displayed on the view

Source: Internet
Author: User

As you all know, UITableView has a reloaddata method that can tableview refresh the view. And the normal view above. How do we refresh the view?

I did it. A user is logged in to display the user's nickname and personality Signature as well as the Avatar's interface. When the user logs in, jumps to this page, and then displays the user's simple information. When you click Sign Out, the information disappears.

My approach is to "-(void) Viewwillappear: (BOOL) animated" When the view is going to appear "

Again called "[Self.view addsubview:headimg];" This method. And then when the view is going to jump:

-(void) Viewwilldisappear: (BOOL) animated

Call:

[Headimg Removefromsuperview];

This method.

In this way, the user data is transmitted, you can log in after the user to refresh the user's information.

How iOS refreshes what's displayed on the view

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.