Questions tagged [viewwillappear]

UIViewController instance method that notifies the view controller that its view is about to be added to a view hierarchy.

View controller subclasses typically override viewWillAppear to perform any tasks to customize the display of the view, based on the context in which the view is being displayed, as described in the documentation.

292 questions
0
votes
1 answer

UIButton setBackgroundImage and viewWillAppear

Ok guys I got a problem with UIButton, maybe that´s simple to solve. I have a button with an IBAction toggleMusic which changes the background image. -(IBAction)toggleMusic{ if (gameAppDelegate.playMusic) { gameAppDelegate.playMusic =…
user1347271
  • 127
  • 1
  • 8
0
votes
2 answers

popViewController animated:YES not animating

I have a download button in my view and when the button is clicked, the app opens the app store with [[UIApplication sharedApplication] openURL] However when I switch back to my app, I find that the [popViewController animated:YES] in my app is not…
fairzy
  • 37
  • 6
0
votes
2 answers

CABasicAnimation doesn't trigger in viewWillAppear

I have a CABasicAnimation in the viewWillAppear method of "viewA". when I press a button in viewA to go to viewB and then go back to viewA the CABasicAnimation in the viewWillAppear (of viewA) works without problem. but, when I go from viewA to…
Ramin Afshar
  • 989
  • 2
  • 18
  • 34
0
votes
1 answer

Where should I put the logic to get the record from Database?

I have two buttons on a action sheet, when I click one of the button, it will display all the students record in another view. All these records need to be retrieved from DB. Currently I put the logic of retrieve the record in the viewwillAppear…
user1330526
  • 151
  • 1
  • 3
  • 10
0
votes
2 answers

Monitor App Utilisation

Is there any way to track iPhone app utilisation? I'd like to know every time a user has opened or interacted with my app. I don't want any other information about the user or their device. I don't even need to identify the user. I just want to…
Sean
  • 440
  • 1
  • 6
  • 20
0
votes
1 answer

Irregular behavior using the viewDidAppear and viewDidLoad methods

I am trying to update some of my views when they appear, so I naturally found myself using the viewDidAppear: and viewWillAppear: methods. However, I have experienced two problems with using these methods: When I only implement one of the methods,…
bgottlob
  • 527
  • 2
  • 6
  • 14
0
votes
1 answer

Icon badge based on number of UITableView cells/entries

I'm working on a Todo style app using Core Data and UITableView. I want the app icon on the home screen to show a badge for the number of entries in the TableView, but I'm having an issue. When I add a new cell, it updates fine. The badge matches…
mhbdr
  • 753
  • 2
  • 10
  • 26
0
votes
0 answers

View will appear of second view runs earlier than view will disappear of first view?

i use it for some kind of initialization and it fails in such way. Is it possible to use smth another? It's initialization of some kind of UDP client.
Horhe Garcia
  • 882
  • 1
  • 13
  • 28
0
votes
1 answer

UIScrollView will not accept subviews until view will appear

Have a view controller with a UIScrollView. This view controller is created / loaded at the start of the app. Before the controller is ever seen, trying to add subviews to the scrollview and the scrollview will not accept / add the sub views. …
ort11
  • 3,359
  • 4
  • 36
  • 69
-1
votes
1 answer

viewWillAppear flickering

I have a tabbar and on one tab I have a UIPickerView. To execute NSUserDefaults, I need to use viewWillAppear, but that causes a strange flickering each time I change from an other tab to this tab. The tab loads a local pdf file, and each time I…
AmiiQo
  • 353
  • 1
  • 7
  • 17
-1
votes
1 answer

Why screen viewWillAppear is not calling when i back from browser in swift

I am calling my servicecall in viewWillAppear, and in same screen when i click on button webpage is opening in safari browser here when i go back to app from safari then my servicecall is not calling why? like this i am going back from safari to…
anySwift
  • 87
  • 1
  • 8
-1
votes
2 answers

View will appear did not getting call

In my application i am using a tabbar. First time when the app is loading it calls the functions in the viewDidload. But when I click on the other tabs and click back the 1st tab again i need to call the functions in viewWillAppear. It didnt call…
-1
votes
1 answer

How to update viewcontroller

I’ve put code in ViewWillAppear and I’ve tried ViewDidAppear but the app only updates when I close it and re-open it. Anyone have any idea on how to fix this? I’m using UserDefaults to update the app with. I’m new to swift and I’m using storyboard…
-1
votes
1 answer

UIView Animation and UIButton stop working b/c Home pressed - Swift 4

I have a playButton that performs a "breathing animation". The button works just fine when I press it. The problem occurs if I press the device's Home Button and then re-open the app. Upon re-opening, the playButton does not have the "breathing…
user10992525
-1
votes
1 answer

Why are interface changes done in viewWillAppear not invisible?

I have a modal ViewController acting as a custom alert in my app. In it, I have a UIButton title set to some "default text" in Interface Builder. In my viewWillAppear method, I am setting the button title to "new text". When I run the app and alert…
Kashif
  • 4,642
  • 7
  • 44
  • 97
1 2 3
19
20