func scrollViewDidScroll(scrollView: UIScrollView){
var offset:CGFloat,scrollheigt:CGFloat
offset=(scrollView.contentOffset.y + scrollView.frame.size.height)
scrollheigt=scrollView.contentSize.height
let offstr = NSString(format: "%.2f", offset)
let scrollheigtstr = NSString(format: "%.2f", scrollheigt)
print(scrollheigtstr)
print(offstr)
if offstr.isEqualToString(scrollheigtstr as String)
{
if popdetailarr.count<3
{
}
else
{
self.CallPostListAPI()
}
}
}
++++++++++++++++++++++++++++++++++++++++++++++++++++
func scrollViewDidScroll(_ scrollView: UIScrollView)
{
var offset:CGFloat,scrollheigt:CGFloat
offset=(scrollView.contentOffset.y + scrollView.frame.size.height)
scrollheigt=scrollView.contentSize.height
print(offset)
print(scrollheigt)
if offset >= (scrollheigt-20)//offstr.isEqualToString(scrollheigtstr as String)
{
if ProductARAY.count<50
{
}
else
{
if is_status == false
{
self.Main_product_apicall()
}
}
}
}
var offset:CGFloat,scrollheigt:CGFloat
offset=(scrollView.contentOffset.y + scrollView.frame.size.height)
scrollheigt=scrollView.contentSize.height
let offstr = NSString(format: "%.2f", offset)
let scrollheigtstr = NSString(format: "%.2f", scrollheigt)
print(scrollheigtstr)
print(offstr)
if offstr.isEqualToString(scrollheigtstr as String)
{
if popdetailarr.count<3
{
}
else
{
self.CallPostListAPI()
}
}
}
++++++++++++++++++++++++++++++++++++++++++++++++++++
func scrollViewDidScroll(_ scrollView: UIScrollView)
{
var offset:CGFloat,scrollheigt:CGFloat
offset=(scrollView.contentOffset.y + scrollView.frame.size.height)
scrollheigt=scrollView.contentSize.height
print(offset)
print(scrollheigt)
if offset >= (scrollheigt-20)//offstr.isEqualToString(scrollheigtstr as String)
{
if ProductARAY.count<50
{
}
else
{
if is_status == false
{
self.Main_product_apicall()
}
}
}
}