我刚刚将这个AGPhotoBrowser类实现到我的Xcode项目中,我得到的错误是:
Terminating app due to uncaught exception 'NSRangeException', reason: '-[UITableView _contentOffsetForScrollingToRowAtIndexPath:atScrollPosition:]: row (7) beyond bounds (0) for section (0).'
Run Code Online (Sandbox Code Playgroud)
崩溃发生的代码在这里:
#pragma mark - UIScrollViewDelegate
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
{
if (!self.currentWindow.hidden && !_changingOrientation) {
[self.overlayView resetOverlayView];
CGPoint targetContentOffset = scrollView.contentOffset;
UITableView *tv = (UITableView*)scrollView;
NSIndexPath *indexPathOfTopRowAfterScrolling = [tv indexPathForRowAtPoint:targetContentOffset];
[self setupPhotoForIndex:indexPathOfTopRowAfterScrolling.row];
}
}
Run Code Online (Sandbox Code Playgroud)
一旦我退出实现的ViewController地方,崩溃似乎就会发生?
我多年来一直试图让我的脚本发挥作用,但它就是不成功!我试图在 5 秒后点击我的 Twitter/关注页面上的所有“取消关注”按钮。这是我的代码,没有 setInterval 函数:
var buttonArray = document.getElementsByClassName('w-button-common w-button-unfollow'); for(var a=0;a<buttonArray.length;a++){ buttonArray[0].click(); }
Run Code Online (Sandbox Code Playgroud)
以下是取消关注按钮的 Twitter HTML DOM 代码:
<span class="w-button-common w-button-unfollow"><input alt="Follow" src="https://ma.twimg.com/twitter-mobile/97bb0ca1daa74ae65fd470b1961897275eb91579/images/sprites/followchecked.gif" type="image"></span>
<input type="hidden" name="scribe_item" value="description=list&id=1875185790&item_type=3">
</form>
</td>
Run Code Online (Sandbox Code Playgroud)
如果有人可以修改我的代码,我将不胜感激!提前非常感谢!
button ×1
click ×1
ios ×1
javascript ×1
jquery ×1
objective-c ×1
twitter ×1
uiscrollview ×1
xcode ×1