草庐IT

current_index

全部标签

ios - UICollectionview 自定义布局 : some indexes have more visible cells than others?

我遇到了一个奇怪的问题,我似乎无法弄清楚或无法在线找到任何相关信息。因此,我尝试使用UICollectionView和自定义UICollectionViewFlowlayout复制ShazamdiscoverUI。到目前为止一切都运行良好,但是当我(或者更确切地说是实现它的人)添加“卡片堆”效果时,注意到似乎有一个奇怪的问题,在某些情况下(或者更确切地说,当特定索引可见时,在示例中它是第5、9行)将有4个可见单元格而不是3个。我的猜测是这与单元格重用有关,但我不确定为什么它正在这样做。我查看了各个单元格的尺寸,它们似乎都相同,所以并不是单元格的大小不同。有人知道为什么会发生这种情况吗?

objective-c - Objective-C : How to set the subview display in the current visible frame? (UITableView)

我有一个UITableViewController并打算在单击按钮(即刷新按钮)时向其添加subview。我的代码如下://setuploadingpageself.myLoadingPage=[[LoadingPageViewControlleralloc]init];self.myLoadingPage.view.frame=self.view.bounds;self.myLoadingPage.view.hidden=NO;[self.viewaddSubview:self.myLoadingPage.view];我的问题是如何将此subview设置在当前可见框架中?特别是对于U

iphone - 如何检测 "would like to use your current location"选择 Action ?

正如我们所知,CLLocationManager可用于在警告许可的情况下获取当前位置:“MyAppName”想使用您的当前位置”|“不允许”|“允许”。在用户选择“不允许”或“允许”后,我们如何检测选择操作?我们将不胜感激任何帮助! 最佳答案 -(void)locationManager:(CLLocationManager*)managerdidChangeAuthorizationStatus:(CLAuthorizationStatus)status{if(status==kCLAuthorizationStatusDenie

ios - UITableView 数组返回错误 'index 0 beyond bounds for empty array'

我已经在我的MatchCenterViewController中以编程方式创建了一个UITableView,但是它似乎没有填充我的云代码函数返回的JSON数据。它崩溃并给我以下错误:2014-06-0820:56:23.762Parse+Storyboard[9136:607]***Terminatingappduetouncaughtexception'NSRangeException',reason:'***-[__NSArrayIobjectAtIndex:]:index0beyondboundsforemptyarray'***Firstthrowcallstack:(0Cor

ios - IOS 上的 React-native : cannot adjust current top of stack beyond available views

在编写组件时,我的IOS模拟器突然出现一个非常奇怪的错误:“无法调整当前堆栈顶部超出可用View”这是我的代码:varBadge=require('./badge');varSeparator=require('./helpers/seperator');varView=React.View;varStyleSheet=React.StyleSheet;varScrollView=React.ScrollView;varText=React.Text;varProfile=React.createClass({_getRowTitle:function(userInfo,item){i

ios - 当我收到 SDK 的 : <Google:HTML> You are currently using version 7. 6.0 消息时,如何在 Xcode 中升级 Google Mobile Ads SDK?

当我在模拟器中运行我的iOS应用程序时,我在Xcode中收到此日志消息:Youarecurrentlyusingversion7.6.0oftheSDK.PleaseconsiderupdatingyourSDKtothemostrecentSDKversiontogetthelatestfeaturesandbugfixes.ThelatestSDKcanbedownloadedfromhttps://developers.google.com/admob/ios/download.Afulllistofreleasenotesisavailableathttps://develop

iphone - 我的代码在使用核心数据时崩溃并出现 'index beyond bounds' 错误

我不确定如何解决这个问题。每次用户滚动并在UITableView中显示时,此代码都会在每个单元格中运行:self.isFinishedProcessing=NO;[selfsetNeedsDisplay];[self.mediaArrayremoveAllObjects];self.mediaArray=[[NSMutableArrayalloc]init];dispatch_queue_tqueue=dispatch_queue_create("setup_cell",NULL);NSManagedObjectID*objectID=[self.entryobjectID];disp

ios - Tableview 按钮获取 index.row

我在tableview单元格中有一个按钮(名为“deleteTemplate”),当它被按下时我应该得到按钮所在单元格的“index.row”。任何人都知道如何获得“index.row”对于单元格,当您单击单元格中的按钮时?我当前的按钮代码:UITableViewCell*clickedCell=(UITableViewCell*)[[sendersuperview]superview];NSIndexPath*clickedButtonIndexPath=[self.tableViewindexPathForCell:clickedCell];NSDictionary*dic=[ta

ios - 异常 'NSRangeException' ,原因 : '*** -[__NSArrayM objectAtIndex:]: index 19 beyond bounds [0 .. 18]'

我已经找过其他类似的帖子,但没有一个能解决我的问题。我收到此错误:***Terminatingappduetouncaughtexception'NSRangeException',reason:'***-[__NSArrayMobjectAtIndex:]:index19beyondbounds[0..18]'我正在使用搜索栏和显示Controller从PARSE.COM数据库获取数据。这是我的代码:#import"busquedaViewController.h"@interfacebusquedaViewController()@end@implementationbusqued

iOS7 Safari : tapping on fixed positioned header bar with higher z-index triggers event handler of the element underneathe it

我的网页有一个固定位置的标题栏。当您滚动时,内容将使用z-index位于标题栏下方。单击内容区域中的block将切换其颜色。单击标题中的任意位置不应触发block的事件处理程序。但这在iOS7Safari上不起作用。点击标题使block改变颜色。当我搜索互联网时,它似乎是iOS7的错误。试过window.scrollTo(0,0)和额外的20px东西,没有帮助。有趣的是,我在iOS7移动版Safari上的YahooFinance和YahooSport网络应用程序上注意到了同样的问题,它们也有固定的标题。有人知道一个好的解决方案吗?代码如下:header{position:fixed;t