I'm developing an iOS 6 app for iPad. I have a Subclass and I'd like to call a ViewController's object from it. How can I do it?
Asked
Active
Viewed 39 times
1 Answers
1
i think you want to access the properties of your ViewController into your subclass. then treat that properties is like your subclass properties.
subclass means you have derived base viewController into your subviewController i.e. now you have all properties & methods of baseViewController into your subViewController.
example- it is like you are inheriting TableViewController into ViewController
@interface ViewController: UITableViewController
now here you can easily use tableView of TableViewController as like it is the property of your ViewController & you can access it like
self.tableView

Ravindra Bagale
- 17,226
- 9
- 43
- 70
-
But the problem is that it's not a subclass of the ViewController, it's a UIScrolView subclass. So it doesn't work. – Marti Serra Vivancos Feb 23 '13 at 19:09
-
it's just like this http://stackoverflow.com/questions/15044677/modifying-uibuttons-alpha-property-not-working-ios – Marti Serra Vivancos Feb 23 '13 at 19:38