Closed lfarah closed 9 years ago
Hi Ifarah, could you post the code where you instanciate the loader?
Are you using UITableViewController or a UIViewController with a UITableView on top?
Im using an UIViewController with a UITableView on top
class Categories: UIViewController,UITableViewDataSource,UITableViewDelegate,UISearchBarDelegate {
@IBOutlet weak var tableview: UITableView!
@IBOutlet weak var searchBar: UISearchBar!
@IBOutlet weak var butCancel: UIBarButtonItem!
var bouncingBalls: PQFBouncingBalls!
override func viewDidLoad()
{
super.viewDidLoad()
self.bouncingBalls = PQFBouncingBalls(loaderOnView: self.view)
self.bouncingBalls.backgroundColor = UIColor.redColor()
self.bouncingBalls.show()
}
}
So, in that case, you have to add the loader to the table view, because it's the top view of the hierarchy. Now what you are doing is to add it between the view controller and the table view.
The code should look like this: self.bouncingBalls = PQFBouncingBalls(loaderOnView: self.tableView.view)
Try it, and tell me. That's a thing that is going to be solved in the next version.
The problem on doing this is because once the tableview is scrolled, the bouncingBalls are being scrolled too!
Ok... Let me check it tomorrow, cause today I cannot, and I'll tell you something
I think I found a way, but I don't think is the right way. I'll test it later. The right way would be making the BouncingBalls always on the front.
-(void)scrollViewDidScroll:(UIScrollView *)scrollView {
CGRect newFrame = awView.frame;
newFrame.origin.x = 0;
newFrame.origin.y = self.tableView.contentOffset.y+(self.tableView.frame.size.height-kAdWhirlViewHeight);
awView.frame = newFrame;
}
@lfarah Fixed on the new release https://github.com/poolqf/PQFCustomLoaders/releases/tag/1.0.1
Im setting my loader on viewDidLoad and it appears that it is behind my tableview. To test it, I've set the background to red.