草庐IT

show_frame

全部标签

ios - 修改 UIViewController.frame 时约束发生变化

我有一个UIViewController,我小时候将它添加到另一个UIViewController。添加子项时,父项使用childVC.frame=....为我的子项设置框架,但这会破坏我的约束。我可以很容易地在IB中复制这个问题。创建一个UIViewController,将大小更改为“自由格式”并放弃状态栏(只是为了在视觉上看起来正确)。添加UIButton(或任何东西)和约束,使它们的大小相同(见下图)现在更改ViewController中顶层View的大小并观察会发生什么。它改变了我对我的约束。我希望我的按钮变大并且仍然保持原来的约束。如果您在屏幕中的iPhoneRetina3.

android - Jquery 手机 : How to show popup above a fixed footer?

如何将弹出窗口放置在固定页脚上方,就像附图中所描绘的那样?http://i.stack.imgur.com/dADjb.jpg谢谢。 最佳答案 jQueryMobile弹出窗口的问题是x,y定位无法正常工作。但我们可以作弊,看看这个工作示例:http://jsfiddle.net/Gajotres/LSakj/HTML:OpenPopupUslučajuhitnoćekoristiovajizbornik!在这种情况下,数据位置设置为页脚ID。不幸的是,这会将它放在页脚上,所以我们需要额外的CSS来将它放在页脚上。CSS:#popu

ios - 你如何阻止 UIWindow 剪裁到旋转边界并显示 'black frame' ?

我正在iPad上创建一个iOS应用程序,我的UIWindow和它的rootViewController对所有4个界面方向都有自动旋转。我在rootViewController.view中添加了一个带有AVPlayer的View。在该View中播放的视频是1280x1280(ipad的屏幕对角线长度)。我想要的是,当用户旋转ipad时,视频居中且足够大,以便当动画旋转到不同的界面方向时,视频仍会填充角落,而不是显示黑框。这可以正常工作,但我发现UIWindow有效地剪辑到它的边界并且在它自动旋转时仍然显示“黑色边框”。看到的黑色边框实际上是UIWindow“背后”的黑色。我试过设置uiW

ios - UITabViewController : how to access the correct visible tab bar (selectedViewController showing wrong results)

使用UITabBarControllerDelegate方法:-(void)tabBarController:(UITabBarController*)tabBarControllerdidSelectViewController:(UIViewController*)viewController{//Iwanttocheckthecurrentlydisplayedviewcontrollerandtheselectedonetodecidewhattodoif(self.selectedViewController==self.viewController1){if(viewCon

ios - 为什么无法使用 class_getProperty 获取 UIView.frame 属性?

它总是返回NULL而不是属性。objc_property_tproperty=class_getProperty([UIViewclass],"frame");XCTAssertTrue(property!=NULL,@"UIView.framepropertyshouldbehere.");例如,与center配合使用时效果很好,但与frame配合使用时似乎不行。有人能解释一下吗? 最佳答案 哇哦,好像确实没有这个属性,而是一个方法。文档显示为属性,但实际上它是一种方法。https://github.com/JaviSoto/iO

iOS:带有 "Show more"按钮的 UILabel

我在UILabel中有一段文本Loremipsumdolorsitamet,consecteturadipiscingelit.Vestibulumegettortorporttitor,aliquammagnabibendum...showmore当我点击“显示更多”时,它应该展开Loremipsumdolorsitamet,consecteturadipiscingelit.Vestibulumegettortorporttitor,aliquammagnabibendum,venenatisnunc.Aeneancommodonislvelsemperblandit.Vivamu

iOS/AVFoundation : How to eliminate (occasional) blank frames between different videos within an AVComposition during playback

我正在开发的应用程序通过以连续的间隔多次将相同的AVAssetTrack(从原始视频url创建)添加到相同的AVComposition来循环播放视频指定的次数。该应用程序通过从组合的AVMutableCompositionTrack(对于AVMediaTypeVideo)中“删除”时间范围并将新剪辑的AVAssetTrack插入到先前删除的时间范围中,类似地将新视频剪辑插入到现有组合中。但是,在将如上所述的新剪辑插入原始循环视频的重复时间范围内后,偶尔且很少见,会产生空白帧,这些空白帧仅出现在视频循环的过渡点(在合成内),但仅在播放期间-视频可以正确无间隙地导出。这让我相信问题出在AV

ios - iOS 中的 -(CGRect *)frame 方法是什么?

代码:if(!CGRectContainsPoint([[viewArrayobjectAtIndex:0]frame],CGPointMake(newX,newY))){....}问题我想在View数组中获取UIView的“框架”值,所以我使用了这个:((UIView*)[viewArrayobjectAtIndex:0]).frame我利用(UIView*)强制将id对象转换为UIView,否则会触发错误,如“在类型为‘id’的对象上找不到属性‘frame’”。但是下面的方法似乎成功地摆脱了这个错误:[[viewArrayobjectAtIndex:0]frame]所以[idfra

ios - ffmpeg ios : Getting frame to UIImage, 在 YUV420 到 RGB 转换时失败

我正在尝试使用ffmpeg从电影文件中提取缩略图。我找到了iFrameExtractor并尝试使用它的代码作为我正在做的事情的基础。在编译FFMPEG时似乎有一个我遗漏的选项,因为这部分代码正在生成......img_convert_ctx=sws_getContext(pCodecCtx->width,pCodecCtx->height,pCodecCtx->pix_fmt,outputWidth,outputHeight,PIX_FMT_RGB24,sws_flags,NULL,NULL,NULL);这个错误:[swscaler@0x7ffb6a06d600]Noaccelerat

IOS 设置 UIViewController.view.frame = CGCGRect(x : -200. .) 不能点击按钮

我想把几个UIViewController放在一起:leftViewController.view.frame=CGRect(x:-200,y:0.0,width:size.width/drawerSize,height:size.height)//CenterDrawercenterViewController.view.frame=CGRect(x:leftViewController.view.frame.width,y:0.0,width:centerWidth,height:size.height)//RightDrawerrightViewController.view.f