Reputation: 4968
I have problem in uialerttable view in ios7 .I have used the same code its working in ios6 but it's not supported in ios7 .It won't go for cell for row index path for table view. This the link https://github.com/blommegard/SBTableAlert , I have downloaded it work fine ios 6 but ios 7 have a problem please help me out friends. Thanks advance.
Upvotes: 1
Views: 767
Reputation: 1805
iOS 7 onwards you cant addSubView.. So if you can determine the OS version and set the table accordingly.
#define IS_OS_7_OR_LATER ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0)
if(IS_OS_7_OR_LATER) {
[yourAlertView setValue:yourTableView forKey:@"accessoryView"];
}
else
{
[yourAlertView addSubview:yourTableView];
}
Instead of using a custom library, create your own tableViewcontroller class and add it as a sub view or set it for accessory view.
Upvotes: 0
Reputation: 5331
If you have any problem with github code, just look at the issue list in Github code page. I founded that a solution which was mentioned in that page. Look at this link. They Replaced UIAlertView
with TSAlertView.
Upvotes: 2
Reputation: 2266
iOS does not support adding subview
to UIAlertView
after iOS 7. So the library you using will not work in iOS7 or higher.
Upvotes: 2
Reputation: 4584
I was having the same problem with this type of controller (UITableView
in UIAlertView
) and wested so much time to debug this issue.
This is disappointing that from iOS7
you can not add any subview
to UIAlertView
, and all this type of controller uses the same method. They inserts UITableView
as subview
of UIAlertView
.
So for your solution you have to drop option for using this controller and create your own controller or find some other controller as per your need.
Upvotes: 0