uikit

How to get UIImage from EAGLView?

我只是一个虾纸丫 提交于 2019-12-17 06:06:49
问题 I am trying to get a UIImage from what is displayed in my EAGLView. Any suggestions on how to do this? 回答1: EDIT: as demianturner notes below, you no longer need to render the layer, you can (and should) now use the higher-level [UIView drawViewHierarchyInRect:] . Other than that; this should work the same. An EAGLView is just a kind of view, and its underlying CAEAGLLayer is just a kind of layer. That means, that the standard approach for converting a view/layer into a UIImage will work.

Animation in OpenGL ES view freezes when UIScrollView is dragged on iPhone

不打扰是莪最后的温柔 提交于 2019-12-17 05:49:06
问题 I have an animated transparent OpenGL ES subview (a modification of Apple's template EAGLView class) which draws a rotating sphere. Just like Apple's example, CADisplayLink is used on devices where available. On the same screen, there is a UIScrollView containing UIButtons that can be selected. When the user scrolls the UIScrollView, the animation of my EAGLView freezes. This behavior is reproduced on iOS Simulator 4.2 and on iPhone OS 3.1.3 on an iPhone 2G device. Any ideas on what to do to

Achieving bright, vivid colors for an iOS 7 translucent UINavigationBar

前提是你 提交于 2019-12-17 04:09:35
问题 iOS 7.1 UPDATE : Looks like the workaround for modifying the alpha channel in the UINavigationBar has been ignored in this update. Right now, the best solution seems to be to just 'deal with it' and hope that whatever color you choose can render a translucent effect. I am still looking into ways of getting around this. iOS 7.0.3 UPDATE : The GitHub library we created has been updated to slightly work around this issue when using iOS 7.0.3. Unfortunately, there is no magic formula to support

Achieving bright, vivid colors for an iOS 7 translucent UINavigationBar

那年仲夏 提交于 2019-12-17 04:09:09
问题 iOS 7.1 UPDATE : Looks like the workaround for modifying the alpha channel in the UINavigationBar has been ignored in this update. Right now, the best solution seems to be to just 'deal with it' and hope that whatever color you choose can render a translucent effect. I am still looking into ways of getting around this. iOS 7.0.3 UPDATE : The GitHub library we created has been updated to slightly work around this issue when using iOS 7.0.3. Unfortunately, there is no magic formula to support

How to resize a UIModalPresentationFormSheet?

ε祈祈猫儿з 提交于 2019-12-17 03:22:41
问题 I am trying to display a modal view controller as a UIPresentationFormSheet. The view appears, but I can't seem to resize it. My XIB has the proper height & width, but it seems to get overridden when I call it like this: composeTweetController = [[ComposeTweet alloc] initWithNibName:@"ComposeTweet" bundle:nil]; composeTweetController.modalPresentationStyle = UIModalPresentationFormSheet; [self presentModalViewController:composeTweetController animated:TRUE]; Any thoughts? I am using the

Aligning text and image on UIButton with imageEdgeInsets and titleEdgeInsets

主宰稳场 提交于 2019-12-17 02:28:08
问题 I would like to place an icon left of the two lines of text such that there's about 2-3 pixels of space between the image and the start of text. The control itself is Center aligned horizontally (set through Interface Builder) The button would resemble something like this: | | |[Image] Add To | | Favorites | I'm trying to configure this with contentEdgeInset, imageEdgeInsets and titleEdgeInsets to no avail. I understand that a negative value expands the edge while a positive value shrinks it

Is there any ready-made calendar control for iPhone apps? [closed]

梦想与她 提交于 2019-12-17 01:34:10
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . I am building an applicaiton for the iPhone that will display upcoming and past events. I settled for a list view, but then I realized that a calendar (just like the one displayed in the "month" view in the built-in Calendar application) would be a best match. However, the iPhone Human Interface Guidelines just

UITableViewCell, show delete button on swipe

情到浓时终转凉″ 提交于 2019-12-17 01:22:10
问题 How do I get the delete button to show when swiping on a UITableViewCell ? The event is never raised and the delete button never appears. 回答1: During startup in (-viewDidLoad or in storyboard) do: self.tableView.allowsMultipleSelectionDuringEditing = NO; Override to support conditional editing of the table view. This only needs to be implemented if you are going to be returning NO for some items. By default, all items are editable. - (BOOL)tableView:(UITableView *)tableView

Underline text in UIlabel

北城余情 提交于 2019-12-17 00:48:03
问题 How can I underline a text that could be multiple lines of string? I find some people suggest UIWebView, but it is obviously too heavy a class for just text rendering. My thoughts was to figure out the start point and length of each string in each line. And draw a line under it accordingly. I meet problems at how to figure out the length and start point for the string. I tried to use -[UILabel textRectForBounds:limitedToNumberOfLines:] , this should be the drawing bounding rect for the text

How do I inspect the view hierarchy in iOS?

戏子无情 提交于 2019-12-16 22:21:13
问题 Is there a GUI tool that inspects the view hierarchy of an iOS app? I'm thinking about Webkit's web inspector or similar tools. I'm looking to debug layout issues, like views having the wrong position or size, or a child not being properly contained in its parent. Currently I have to add asserts that test these various conditions by hand, or set different background colours on different views, and as you can imagine, that's a really tedious way to go about it. I looked at Instruments's UI