I am creating a tableView cell through XiB, and creating views in it programmatically, so XiB has some width lets say 350, and tableView can now have width according to the screen size, so my views does not have width matching the tableView width, how to achieve this?
Inside TableView's layoutSubViews method I tried to check the superView of cell and if found TableView I tried to get its width and accordingly gave width to views, but layout method is called after cellForRow so it crashes with views are nil. Another thing I did was in TableView's didMoveToSuperView I did same thing and also created the Views there itself with flag for creating only once, it is working for now but I want to see if there is much better and cleaner solution to this.