Questions tagged [loadview]

90 questions
1
vote
1 answer

How can I know if a viewcontroller is loaded because of a push or because of a view reconstruction after a pop on a UINavigationController?

I use a UINavigationController with several viewcontrollers. One of the viewcontrollers, which is constructed programmatically in loadview:, does some custom animations to do a transition from the previous viewcontroller. So these animations should…
Pieter
  • 17,435
  • 8
  • 50
  • 89
1
vote
2 answers

Loading View in Swift

quick question! Sorry for noobiness in advance. I recentely started developing iOS applications and wanted to load a view for clicking a button. Im working in swift4. @IBAction func btnAddItem_AddDrinks_Click(_ sender: Any) { //[self…
restores
  • 41
  • 3
1
vote
0 answers

datatable not working when including a view inside another view

1) - The Controller Code class Welcome extends CI_Controller { public function index() { $dataView['content'] = $this->load->view('crud_view','', TRUE); //$dataView['content'] = 'crud_view'; …
1
vote
3 answers

Programmatically layout iPhone UIView?

I am using the iPhone toolchain on Linux and so I have no Interface Builder. So how could I layout my view in my ViewController subclass? For example, I want a UITextView in the middle of the screen? Should I do this in the loadView or viewDidLoad.…
Mohit Deshpande
  • 53,877
  • 76
  • 193
  • 251
1
vote
2 answers

Adding autolayout constraint programmatically turns uiview to black

I need a view controller without xib. There should be a webview with fully filled to the view. For that I've added the following code to loadView method. - (void)loadView { CGRect applicationFrame = [[UIScreen mainScreen] applicationFrame]; …
Johnykutty
  • 12,091
  • 13
  • 59
  • 100
1
vote
1 answer

jquery creating variable and using it to for load - laravel

I am a newbie in jQuery, obviously I don't really understand some basics, although I have read some tutorials. I Have two buttons: News 1
Peter
  • 2,634
  • 7
  • 32
  • 46
1
vote
1 answer

Use a different class for UIViewController's View property

By default UIViewController's view property is a UIView instance. Is it possible to change it to instead be an instance of MyView, a subclass of UIView, without having to override the -view getter to return an instance of MyView? With storyboards…
pnizzle
  • 6,243
  • 4
  • 52
  • 81
1
vote
1 answer

loadNibNamed from storyboard

This is the scenario: A simple app with two viewcontroller classes and a storyboard with 1 viewcontroller. ViewController 'Super' inherits from UIViewcontroller and implements -loadView and the other view controller, 'Sub', inherits from 'Super'.…
Nextorlg
  • 794
  • 1
  • 8
  • 16
1
vote
2 answers

self.view = aViewController.view vs [aViewController loadView] -

I am trying to understand the behavior of view controllers when switching from one to another (displaying different views) A part form the addSubiew statements which seem to work, I can't find an explanation to what happens with the two…
user236739
  • 1,323
  • 2
  • 15
  • 21
1
vote
3 answers

iOS programmatic grouped table empty

I have a programmatically implemented tableView, in the grouped style. All I am getting is the gray pinstripes when it should be populated. So it is loading, but not ... something... What more is necessary? If no more, then where else ought I…
Morkrom
  • 578
  • 7
  • 26
1
vote
3 answers

iPhone Dev - UIView frame and loadView

I'm learning to develop for iPhone (programmatically, I don't like IB). I only use IB for the frames of things, so I design in IB but only use it to check each control's frame. Something I've gotten very confused about is the frame of a UIView.…
mk12
  • 25,873
  • 32
  • 98
  • 137
1
vote
2 answers

EXC_BAD_ACCESS in storyboard loadView after memory warning

I have created two view controllers say A and B with storyboard and ARC. VC A is calling B by performSegueWithIdentifier and B returns to A by dismissViewControllerAnimated. This is working well, until I simulate a Memory Warning during I am in VC…
1
vote
0 answers

InitWithNibName returns viewController but view is nil

Other xib's auto-load fine, but not this one. When I push this viewcontroller, initWithNibName, loadView, viewDidLoad, and viewWillAppear are called fine, but the view (and all self.xxx objects in @interface) are nil in all these methods, and I am…
Henrik Erlandsson
  • 3,797
  • 5
  • 43
  • 63
1
vote
1 answer

Correct method to programmatically create UIView and UIViewController and link together

I'm new to iOS development. To keep my iOS app nicely compartmentalised I'd like to create both the UIView and the UIViewController programatically, and tie them together once created. So, I do the following: in my view controller I have…
whatdoesitallmean
  • 1,586
  • 3
  • 18
  • 40
0
votes
3 answers

when does -tableView:cellForRowAtIndexPath: get called?

I am having this issue with loading up table content in UITableViewController. I have created UITableViewController without the xib. In loadView I am calling a function which generates the array of data to be displayed. And from that array in…
slonkar
  • 4,055
  • 8
  • 39
  • 63