cocoa-touch

Detect if iOS App is Downloaded from Apple's Testflight [duplicate]

喜夏-厌秋 提交于 2020-01-09 07:07:13
问题 This question already has answers here : How to tell at runtime whether an iOS app is running through a TestFlight Beta install (5 answers) Closed 3 years ago . In the past I've had separate build configurations for production and beta builds distributed through TestFlight. This made it easy to make modifications to beta builds, such as exposing additional settings the app to let testers test things more thoroughly and see more technical information about the status of the app. Is there a way

Detect if iOS App is Downloaded from Apple's Testflight [duplicate]

牧云@^-^@ 提交于 2020-01-09 07:07:07
问题 This question already has answers here : How to tell at runtime whether an iOS app is running through a TestFlight Beta install (5 answers) Closed 3 years ago . In the past I've had separate build configurations for production and beta builds distributed through TestFlight. This made it easy to make modifications to beta builds, such as exposing additional settings the app to let testers test things more thoroughly and see more technical information about the status of the app. Is there a way

CGContextDrawPDFPage taking up large amounts of memory

…衆ロ難τιáo~ 提交于 2020-01-09 03:20:08
问题 I have a PDF file that I want to draw in outline form. I want to draw the first several pages on the document each in their own UIImage to use on a button so that when clicked, the main display will navigate to the clicked page. However, CGContextDrawPDFPage seems to be using copious amounts of memory when attempting to draw the page. Even though the image is only supposed to be around 100px tall, the application crashes while drawing one page in particular, which according to Instruments,

How to get UIScrollView vertical direction in Swift?

柔情痞子 提交于 2020-01-09 03:10:29
问题 How can I get the scroll/swipe direction for up/down in a VC? I want to add a UIScrollView or something else in my VC that can see if the user swipes/scrolls up or down and then hide/show a UIView depending if it was an up/down gesture. 回答1: If you use an UIScrollView then you can take benefit from the scrollViewDidScroll: function. You need to save the last position (the contentOffset ) it have and the update it like in the following way: // variable to save the last position visited,

Test whether a UIView is in the middle of animation

﹥>﹥吖頭↗ 提交于 2020-01-08 21:39:50
问题 Is there any way to tell if a UIView is in the middle of an animation? When I print out the view object while it is moving I notice that there is an "animations" entry: search bar should end editing: <UISearchBar: 0x2e6240; frame = (0 0; 320 88); text = ''; autoresize = W+BM; animations = { position=<CABasicAnimation: 0x6a69c40>; bounds=<CABasicAnimation: 0x6a6d4d0>; }; layer = <CALayer: 0x2e6e00>> When the animation has stopped and I print the view, the "animations" entry is now gone: search

Test whether a UIView is in the middle of animation

喜夏-厌秋 提交于 2020-01-08 21:39:24
问题 Is there any way to tell if a UIView is in the middle of an animation? When I print out the view object while it is moving I notice that there is an "animations" entry: search bar should end editing: <UISearchBar: 0x2e6240; frame = (0 0; 320 88); text = ''; autoresize = W+BM; animations = { position=<CABasicAnimation: 0x6a69c40>; bounds=<CABasicAnimation: 0x6a6d4d0>; }; layer = <CALayer: 0x2e6e00>> When the animation has stopped and I print the view, the "animations" entry is now gone: search

Is there a way to remove the separator line from a UITableView?

允我心安 提交于 2020-01-08 19:41:29
问题 I'm looking for a way to completely remove the separator line in a UITableView when in the plain mode. This is done automatically in grouped, but this also changes the dimensions of the table in a way that is hard to measure. I have set the seperator line color to colorClear. But this does not completely solve the problem. As I am trying to draw a custom background view in the cells, and I want the cells to be seamless, the one pixel line that remains in-between is causing me problems. Is

Is it possible to configure a UITableView to allow multiple-selection?

妖精的绣舞 提交于 2020-01-08 16:02:07
问题 For the iPhone, is it possible to configure a UITableView such that it will allow multiple-selection? I've tried overriding -setSelected:animated: for each UITableViewCell, but trying to fudge the required behavior is tricky as it's difficult to separate the real unselections from the ones where the UITableView thinks I've unselected due to selection of another cell! Hope someone can help! Thanks, Nick. 回答1: The best way to do this would be to a checkmark per selected row. You can do that by

UIButton: Making the hit area larger than the default hit area

南楼画角 提交于 2020-01-08 11:21:06
问题 I have a question dealing with UIButton and its hit area. I am using the Info Dark button in interface builder, but I am finding that the hit area is not large enough for some people's fingers. Is there a way to increase the hit area of a button either programmatically or in Interface Builder without changing the size of the InfoButton graphic? 回答1: Since I am using a background image, none of these solutions worked well for me. Here is a solution that does some fun objective-c magic and

NSDateFormatter to NSString?

北城余情 提交于 2020-01-07 06:59:14
问题 NSDate *dateNow = [NSDate date]; NSLog(@"NSDate : %@", dateNow); NSDateFormatter *dateFormatter = [[[NSDateFormatter alloc] init] autorelease]; [dateFormatter setLocale:[NSLocale currentLocale]]; [dateFormatter setTimeStyle:NSDateFormatterLongStyle]; NSString *dateString = [dateFormatter stringFromDate:dateNow]; NSLog(@"NSDateFormatter String: %@", dateString); NSDate *dateObject = [dateFormatter dateFromString:dateString]; NSLog(@"NSDateFormatter Object: %@", dateObject); First off ignore