The home page of my app has UIButtons
, btnIncome
and btnExpense
. Pressing on this buttons pushes IncomeVC
and ExpenseVC
respectevely,which are two UIViewControllers
with UITabBar
added via xib. The tabBar have 4 items. Selecting on each tab item adds same four view controllers(which contains UITableViews
) as the subview of IncomeVC
and ExpenseVC
,like for eg, DailyVC,WeeklyVC,MonthlyVC,YearlyVC.(ie,for Income ,there is daily,weekly etc and same for Expense) (I have done like that because the IncomeVC
and ExpenseVC
have a UIButton
and a UIView
which is common for all tabs).
So the problem is that, if click the btnIncome
I have to populate those tableviews with the arrays related to Income and vice versa for Expense. How can I find from which viewController I selected the different tabs(I need to get it from the 4 Views I added as the subview of IncomeVC and ExpenseVC). Do I have to make 8 different views 4 each for Income and expense ?
Thanx.
question from:
https://stackoverflow.com/questions/16608536/how-to-get-the-previous-viewcontroller-that-pushed-my-current-view 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…