frame

UIPageViewController changes size?

柔情痞子 提交于 2019-12-08 02:12:13
问题 I'm using the Page-Based Application template in Xcode 4 to load pages of a PDF and create a UITextView over hidden text boxes so the user can write notes. So far I have it all working, but when I add the UITextView, it's in the wrong place in landscape mode (showing 2 pages). // ModelController.m - (id)init { self = [super init]; if (self) { NSString *pathToPdfDoc = [[NSBundle mainBundle] pathForResource:@"My PDF File" ofType:@"pdf"]; NSURL *pdfUrl = [NSURL fileURLWithPath:pathToPdfDoc];

Windows phone header same for all pages

不问归期 提交于 2019-12-07 12:06:46
问题 Im creating an App and I have a header that its the same for all pages (a footer as well, but that one ill create using the app bar). My question is, what's the best way to do this if I dont want to repeat the header (code it) in every page. Thank you. 回答1: The best was to do this is create the following: UserControl for the Header UserControl for the Footer Everything Page or UserControl should show these items. 回答2: Look at templating your project so that you can have multiple views and and

Changing SKSpriteNode Frame? Isometric challenges

感情迁移 提交于 2019-12-07 10:12:39
问题 I hope we can figure out how to get around this interesting challenge with a game we are designing in an isometric style. Any help would be so awesome! QUESTION Is there a way to change the bounding box frame from a square to another shape? Maybe using a mask? PROBLEM Our problem is that we need our node's tappable area NOT to be square. Since we are tiling the nodes, their bounding boxes overlap each other, and we cannot accurately tap on the tile that we want. Hopefully our graphic below

ffmpeg drawbox on a given frame

北慕城南 提交于 2019-12-07 06:59:53
问题 I have thousands of rectangle boxes to add in a video. Right now I am using this command: ffmpeg.exe -i small.ts -vf drawbox=10:10:50:50:red,drawbox=100:100:200:200:green small_with_box.ts However I don't want to add the boxes on an entire frame, but on a given one. Anyone know how can I do that? 回答1: The drawbox video filter has timeline editing support. You can see what filters support timeline editing: $ ffmpeg -filters … Filters: T. = Timeline support .S = Slice threading A = Audio input

How to add a picture frame and insert the text in the image?

亡梦爱人 提交于 2019-12-07 06:01:08
问题 This is what I need: Program for quicker making fun posters for facebook page. Posters have text, picture and frame (white line and black background). In this case, I want to insert logo on poster (png image). Depending on picture size, dimensions of frame (who in this case consits of two shapes) must automaticly be resized for picture. How to save poster from that image from link (2 shape components, 2 image components, 2 labels) as picture? How to accomplish this? What to use, where to

Auto Layout + Manual Layout 混用

限于喜欢 提交于 2019-12-07 01:49:59
约束代码混用的问题 无数人趟过此坑,大部分人在坑中一蹶不振,小部分人爬起来也是跌跌撞撞。 有很多人都说auto layout和manual layout的坐标设置是不能混用的,会导致出现布局问题。首先声明一点,autolayout和manuallayout是可以混用的。用的时机很重要,auto layout和manual layout有各自的生命周期和作用域,区分他们两个的作用时间很关键,头脑中一定要清楚你所添加的每条约束,在什么时间场合,会造成什么后果。否则,布局就会和预想的不同,各种奇怪的布局问题也就接踵而至。 1)视图的生命周期顺序 我们在controller视图上面用auto layout添加了一个subview,并在各个系统调用声明周期方法中做了打印处理,结果如下: 其中前面带有“-”符号的表示的是subview视图的打印。 autolayout的作用范围是从上往下第三个方法-updateConstraints一直到viewDidLayoutSubviews,这期间,系统是通过view上的约束来计算view上的布局。而我们一般习惯将布局写在viewDidLoad里面,这就是我们为什么总是无法用manual layout的方法去修改我们的布局。 要想修改布局,必须要在autolayout结束之后才会起作用,否则会被系统将我们的布局按照autolayout重新刷新

Iframes not working

拜拜、爱过 提交于 2019-12-07 00:55:32
问题 I'm trying to get Iframes to work. I'm running safari, so it is compatible, but when I test it, it comes up blank. Code: <iframe src="http://www.google.com" width="100%" height="300"> <p>Your browser does not support iframes.</p> </iframe> I took the code directly from the w3schools website after using the "try it out" editor so I know it's supposed to work. When I changed the page from a page in their subdirectory to an external page, it shows up blank. 回答1: The syntax is correct. It's not

How do I remove panel borders?

蓝咒 提交于 2019-12-06 18:23:08
问题 I need to remove all borders . I already added border:false but it's not working. Note that I want it to have this blue background so I'm using frame : true . My code region: 'north', split: true, border: false, height: 115, layout: 'border', items: [ {///Account info xtype: 'form', region: 'east', border: false, frame: true, //height: 100, width: 500, //'49%',//anchor : '50%', layout: 'column', items: [ { columnWidth: .5, border: false, frame: true, defaults: { labelStyle: 'font-size:9px' },

Creating a frame animation in android

眉间皱痕 提交于 2019-12-06 16:35:59
Hi im trying to set up a frame animation with a series of images as a background for my splash page in an android application, I would if possible like the code to run on start up. I have been writing the code but get an error that says "frame animation cannot be resolved". The java code I have implemented in my main activity is as follows: @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); ImageView frameanimation = (ImageView) findViewById(R.id.frame_animation); AnimationDrawable frame_animation = (AnimationDrawable)

Swift SpriteKit get visible frame size

孤者浪人 提交于 2019-12-06 15:48:31
I have been trying to create a simple SpriteKit app using Swift. The purpose is to have a red ball re-locate itself on the screen when clicked on. But the variables self.frame.width and self.frame.height do not return the boundaries of the visible screen. Instead they return boundaries of the whole screen. Because I am choosing the location of the ball at random I need the visible boundaries. Couldn't find an answer after hours of research. How can I achieve this? var dot = SKSpriteNode() let dotScreenHeightPercantage = 10.0 let frameMarginSize = 30.0 override func didMoveToView(view: SKView)