uikit

UIColor from Hex in Monotouch

那年仲夏 提交于 2019-12-18 11:42:34
问题 How to get a UIColor from an hex value in Monotouch? 回答1: I found some solutions for Objective C and none specifically for Monotouch I ended up developing an extension method based on the most popular solution for IOS: public static class UIColorExtensions { public static UIColor FromHex(this UIColor color,int hexValue) { return UIColor.FromRGB( (((float)((hexValue & 0xFF0000) >> 16))/255.0f), (((float)((hexValue & 0xFF00) >> 8))/255.0f), (((float)(hexValue & 0xFF))/255.0f) ); } } and use it

Connection to assetsd was interrupted or assetsd died

Deadly 提交于 2019-12-18 11:27:48
问题 I load photos from PHAssets. I get this error log when I load some images and pass them to another view controller. I can't seem to find anything online about this. Anyone encounter this and know what it is? I also get this error along with it: ***** Error: logging directory does not exist /var/mobile/Library/Logs/CrashReporter/DiagnosticLogs/ 回答1: There may be following reason : 1.) It may occur when we try to use multiple Image view (Image) so just image and try to release it , it will

iOS Container View doesn't honour intrinsicContentSize

这一生的挚爱 提交于 2019-12-18 11:20:06
问题 I want to use a Container View to contain a camera preview. I want the camera to centered in the middle and maintain it's proper aspect ratio. (it's pink to make it obvious where its frame is) I'm stuck on the first step of trying to get the camera preview to appear at a size that's smaller than the container. I have a UIView subclass for the Camera Controller's view, and have the code: - (CGSize)intrinsicContentSize { return CGSizeMake(320, 240); } Unfortunately this isn't honoured: From

Animate collection view cells [closed]

穿精又带淫゛_ 提交于 2019-12-18 11:14:11
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed last year . How to animate collection view cells like a closing or a sliding from the left-right door in iOS. like this: 回答1: This is code for animation collection view cells like a closing door. This collection has 2 columns. I have added code for UICollectionViewDelegateFlowLayout methods for collection view

iOS7, backgroundImage for UISearchBar

不想你离开。 提交于 2019-12-18 11:03:09
问题 I'm making the transition of the UI between iOS 6 and iOS 7. We have a UISearchBar related to a UISearchDisplayController, I have set the backgroundImage of the navigationBar and the searchBar to a 1x1 image dynamically created with a color. self.searchDisplayController.searchBar.translucent = NO; self.searchDisplayController.searchBar.barTintColor = [UIColor clearColor]; self.searchDisplayController.searchBar.tintColor = [UIColor myTintColor]; self.searchDisplayController.searchBar

How to mimic UITableView's UITableViewStylePlain section header style

白昼怎懂夜的黑 提交于 2019-12-18 11:01:50
问题 My application uses abbreviations in UITableView section header titles that are hard for VoiceOver to pronounce. As I need to make these titles pronounceable by VoiceOver, I need to give the section header title a accessibilityLabel . It seems that the only way to do this is to draw a custom section header cell. I would like to mimic the standard Apple UIKit provided style for these custom section headers but I am uncertain on how to emulate Apple's detailed look of this element. What is the

What iPhone OS APIs could I use to implement a transition animation similar to the iBook page flip transition?

China☆狼群 提交于 2019-12-18 10:46:33
问题 I'm building an iPad app that will have multiple paper pages and I'd like to implement a page transition effect that is similar to the animation you see when you turn pages in the iBooks app on the iPad. A few questions... Is that animation readily available somewhere in the UIKit API or would I have to implement it myself? If I have to implement it myself, what's a good approach or API I should look into? It definitely has a 3D feel to it, could they be using the OpenGL ES API for that? 回答1:

UITextView content inset

一曲冷凌霜 提交于 2019-12-18 10:31:41
问题 I have encountered something a bit strange with contentInsets I have a UITextView in my storyboard with a contentInset of 50 left, as I'm trying to add some padding to my uitextview However, a scrollbar appears on the bottom of the uitextview, as shown below in this test: I was under the impression that contentInset squashes the uitextview without causing this horizontal scroll bar, so how can I remove the need for the horizontal scrollbar and make everything--the inset AND all the text in

IPhone Range Slider

為{幸葍}努か 提交于 2019-12-18 08:59:07
问题 I know there is a UISlider but does anyone already made RangeSlider ( with two thumbs ?) or knows how to extend the uislider? 回答1: I don't think you can directly extend UISlider, you probably need to extend UIControl. Anyway, this is what I did and created this: http://github.com/doukasd/DoubleSlider Have a look and let me know if you find it useful. You might also want to have a look at my blog post which includes a video showing how it works (to make sure we are talking about the same thing

How to deal with non-visible rows during row deletion. (UITableViews)

孤街醉人 提交于 2019-12-18 05:25:11
问题 I am performing a deletion of several rows of a table. In fact, on this occasion all visible cells are in fact deleted. This causes the cell immediately below the visible frame to become visible after the animation, since all cells above it are now gone. Here is the issue, this cell is also deleted. So I get the following error, I assume, because the tableview wants me to delete a cell that isn't on screen. (but WILL be on screen during/after the animation). 2009-06-15 17:44:30.114 HSS[18175