frame

Nativescript: How to use navigation in modals

拜拜、爱过 提交于 2019-12-05 16:22:18
I am creating a settings modal in my app, and I would like to be able to "navigate" to categories of settings within the modal. There are examples of this in apps, like Flipboard for example. If you open the settings, a modal opens, and you can tap a category. It navigates you to a new page (still within the modal), and you get a back button that will bring you back to the modal page. When you close the modal, your navigation stack is still valid, they seem to be two separate stacks. You can even navigate deeper, like open settings > Edit Profile > Change Email. You then can go back twice to

iOS: Adding observer to a UIView's frame.origin.y?

我的梦境 提交于 2019-12-05 16:14:46
问题 I'm trying to monitor and react to the changing value of the origin of a UIView's frame. My code: [cell.bottomView addObserver:self forKeyPath:@"frame.origin" options:NSKeyValueObservingOptionNew context:NULL]; -(void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { NSLog(@"%@ Changed", keyPath); } I'm getting the following error message that I don't understand: An instance 0x7587d10 of class NSConcreteValue was deallocated

Why a frame of a UIView is not updating in ViewDidLayoutSubviews?

早过忘川 提交于 2019-12-05 15:17:04
问题 I am trying to update the frame of a UIView which contains buttons and labels inside. I am trying to update it in viewDidLayoutSubviews (and I also tried in viewDidLoad , viewWillAppear , viewDidAppear ..). I want to change the y position (origin.y) of the view. The NSLogs says my original y position is 334, and after changing, it is 100. However, the position does not change in my view. I have already checked that the view is connected in the storyboard. What am I doing wrong? -(void

UIView frame change Notification

只愿长相守 提交于 2019-12-05 13:16:34
问题 Is there any notification when frame or bounds of UIView changes? Whenever frame of a UIView changes, I need to calculate and set the frame of its custom subview so that it aspect fits in the superview. NSView has the notification NSViewFrameDidChangeNotfication for the purpose. Why is this not there for UIView? 回答1: There is no notification. You can subclass UIView to override layoutSubviews , to either do the layout directly or send the necessary notification. Have you tried setting an

Changing SKSpriteNode Frame? Isometric challenges

徘徊边缘 提交于 2019-12-05 12:46:00
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 will show you what we are designing, our problem, and what our tappable area needs to be. Is there a way

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

眉间皱痕 提交于 2019-12-05 09:13:06
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 begin? I hope that this question will not be removed. If you put all the frames, shapes and pictures inside

Extract frames from a video in real-time android

守給你的承諾、 提交于 2019-12-05 06:31:33
I'm doing an app to record a video. What I would like is that when the app is recording the video, each frame is also saved in an arraylist of RGB values in order to extract particular information from it. I know that the two processes (video recording and extraction of frames) are asynchronous, but this is not a problem: the process of extraction can finish after the video recording. Can someone tell me how I can extract the frames from the video? Thanks very much. Using the camera object you can override a function setPreviewCallback . from that function you would get an array of byte data.

boundingRectWithSize does not respect word wrapping

隐身守侯 提交于 2019-12-05 01:40:09
I create a UITextView, add text to it, and put it in the view (with a container) UITextView *lyricView = [[UITextView alloc] initWithFrame:screen]; lyricView.text = [NSString stringWithFormat:@"\n\n%@\n\n\n\n\n\n", lyrics]; [container addSubview:lyricView]; [self.view addSubview:container]; I then get the size of it for use with a button and add it to the UITextView CGRect size = [lyrics boundingRectWithSize:CGSizeMake(lyricView.frame.size.width, MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName:[lyricView font]} context:nil]; UIButton *doneButton =

Getting frames from .avi video using OpenCV

被刻印的时光 ゝ 提交于 2019-12-05 00:34:19
问题 #include "cv.h" #include "highgui.h" int main(int argc, char** argv) { CvCapture* capture=0; IplImage* frame=0; capture = cvCaptureFromAVI("C:\\boy walking back.avi"); // read AVI video if( !capture ) throw "Error when reading steam_avi"; cvNamedWindow( "w", 1); for( ; ; ) { /* int cvGrabFrame (CvCapture* capture); IplImage* cvRetrieveFrame (CvCapture* capture)*/ frame = cvQueryFrame( capture ); if(!frame) break; cvShowImage("w", frame); } cvWaitKey(0); // key press to close window

Correct way to set ScrollViewer (for vertical scrolling) on a WPF Frame?

房东的猫 提交于 2019-12-05 00:19:45
does anyone know the difference between defining a vertical scrollbar on a frame like this: <ScrollViewer Grid.Row="2" VerticalScrollBarVisibility="Auto"> <Frame Name="Frame1" ScrollViewer.CanContentScroll="True" /> </ScrollViewer> or like this: <ScrollViewer Grid.Row="2"> <Frame Name="Frame1" ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.CanContentScroll="True" /> </ScrollViewer> This frame is nested in a WebBrowser control and setting it the first way correctly displays the vertical scrollbar and is only visible when it needs to scroll (auto). When I set it the second way the