Saya menggunakan tarikan untuk menyegarkan untuk penyegaran data biasa pada tampilan tabel.
Ini kode saya
-(void)addUIRefreshControl{
//Instantiate and Configure Refresh Control
self.refreshControl = [[UIRefreshControl alloc] init]; // initialize refresh control
self.refreshControl.tintColor = [UIColor appBaseColor]; // set tint color
[self.refreshControl addTarget:self
action:@selector(refreshAPI)
forControlEvents:UIControlEventValueChanged]; // add target
[self.tableView addSubview:self.refreshControl]; // add the refresh control
}
-(void)refreshAPI{
if ([APP_DELEGATE isNetAvailable]) {
[self fetchAPI];
}else{
if (self.refreshControl) {
[self.refreshControl endRefreshing]; //end refreshing
}
}
}
Semuanya berfungsi dengan baik di Perangkat & Simulator iOS kecuali untuk iPhone X. Adakah yang bisa menyarankan kesalahan apa yang saya lakukan?
Terima kasih