草庐IT

background-position-y

全部标签

ios - 覆盖 drawRect(_ :) in UITableViewHeaderFooterView results in black background

1。空自定义View实现我创建了UITableViewHeaderFooterView的空子类,如下所示:classMyCustomHeaderView:UITableViewHeaderFooterView{}我用我的TableView注册了那个类:tableView.register(MyCustomHeaderView.self,forHeaderFooterViewReuseIdentifier:"myHeaderView")并实现数据源函数如下:functableView(_tableView:UITableView,viewForHeaderInSectionsection

ios - SKNode的position属性和GKAgent2d的position属性有什么区别

SKNode有一个位置属性,表示节点在父节点中的位置。而GKAgent2D也有一个位置属性,根据文档,它是它在2D空间中的位置。这两者有什么关系?我们如何相互转换,是否需要转换? 最佳答案 您可以在没有SpriteKit的情况下使用GameplayKit。Agent的位置在GameplayKit内部,然后您将sprite的位置同步到您的agent的位置。这意味着您还可以拥有其他框架的代理。 关于ios-SKNode的position属性和GKAgent2d的position属性有什么区别

iphone - Cocos2D-iphone : Difference between Anchor point and position

任何人都可以用一些例子来解释cocos-2D中位置和anchor之间的区别。我在谷歌中搜索但找不到很好的解释,在此先感谢。 最佳答案 假设您有一个10x10的正方形。如果你说你想把它放在屏幕上的(50,40)位置,那么你需要知道那个位置指的是什么地方——你的方block的左上角、左下角等等。anchor指的是这个位置。所以,如果你的anchor是(0,0)那么位置(50,40)将是你的正方形左上角的位置。如果您的anchor是(10,0),那么位置(50,40)将是您正方形右上角的位置,因此左上角将位于(40,40)。因此,anch

objective-c - 核心剧情: Updating position of y axis

我目前正在做一个实时绘图,我每秒都会生成数据。我遇到的问题是,大约15秒后,由于我设置xRange的方式,我的绘图开始自动移动/滚动,这是有意为之的效果,但是我的y轴似乎Root于起源并迅速从屏幕上掉下来。我如何将位置设置为始终位于View的中心,或者我需要更新什么属性才能使Y轴也移动?我已经仔细查看了所有内容,但没有看到任何明显的内容,也没有看到任何根据包含的定义/帮助似乎适用的内容。 最佳答案 我碰巧在一个旧的googlegroups线程中找到了答案,所以我将把它发布在这里作为它在CorePlot1.0中工作的确认,因为这是一个

iOS UITableView : changing background color of table overrides background color of cells

我遇到一个问题,即设置tableView的背景颜色会覆盖我为各个单元格设置的背景颜色。更具体地说,我有一个包含3行的表格:顶部单元格为深灰色,底部2个单元格为红色:http://imgur.com/otYlFMx,LvoLDzY,tXiJenw#0-(void)tableView:(UITableView*)tableViewwillDisplayCell:(UITableViewCell*)cellforRowAtIndexPath:(NSIndexPath*)indexPath{UIColor*sectionBackgroundColor=[UIColorcolorWithRed:

iOS,ARC : Background thread freezes UI

我有一个UIViewController和一个UITableView作为subview。单击某个单元格时,应显示一个UIImagePickerController。由于初始化时间较长,所以当UIViewController确实出现时,我在后台执行此过程。现在我将ARC添加到我的项目中,但它仍然无法正常工作。初始进程卡住了UI。这是我的代码。-(void)viewDidAppear:(BOOL)animated{[superviewDidAppear:animated];[selfperformSelectorInBackground:@selector(initImagePickerC

iOS:dispatch_get_global_queue QOS_CLASS_BACKGROUND 在 7.1.2 上崩溃

我有以下使用block获取联系人的代码片段:if(&ABAddressBookCreateWithOptions!=NULL){CFErrorReferror=nil;addressBook=ABAddressBookCreateWithOptions(NULL,&error);ABAddressBookRequestAccessWithCompletion(addressBook,^(boolgranted,CFErrorReferror){dispatch_sync(dispatch_get_main_queue(),^{if(error){//...}elseif(!grante

ios - 无法结束 BackgroundTask : no background task exists with identifier 1fd57580, 或者它可能已经结束

AppDelegate.m文件包含-(void)applicationDidEnterBackground:(UIApplication*)application{UIBackgroundTaskIdentifiertaskID=[applicationbeginBackgroundTaskWithExpirationHandler:^{[applicationendBackgroundTask:taskID];}];}我不知道为什么我在gdb中收到这条消息Can'tendBackgroundTask:nobackgroundtaskexistswithidentifier1fd575

ios - 需要 iBeacon locationManager :didEnterRegion to trigger at near physical contact when backgrounded

这是我的挑战。我有一个配置为iBeacon的gimbal系列20,我的目标是让我的用户将他们的手机与应用程序后台的信标保持近距离物理接触。想想苹果支付。我已将发射功率一直设置为-23,但它仍然太强,并且信标正在触发DidEnterRegion委托(delegate)方法,距离可达一英尺。使用测距,我可以通过直接测量rssi来进一步设定阈值。该解决方案在应用程序运行时运行良好。我的问题是这个解决方案在后台运行不可靠,因为它在enterRegion事件后仅运行几秒钟然后停止。有没有办法进一步抑制信标的信号强度或其他方式导致locationManger:DidEnterRegion:触发较低

iphone - iOS : How To Make Static or Fix Background on View Controller

我有2个ViewController,它们的.m文件中都有这段代码:-(void)viewDidLoad{[superviewDidLoad];//Doanyadditionalsetupafterloadingtheview.[self.viewsetBackgroundColor:[UIColorcolorWithPatternImage:[UIImageimageNamed:@"background"]]];}并且我在两个ViewController之间进行了推送转换。所以当它在我的iPod上运行时,它看起来像是第二个背景从右到左插入第一个背景。但这不是我想要的,因为两个View