cocoa-touch

Dual Container View Animation iOS

偶尔善良 提交于 2019-12-24 19:02:38
问题 So I've got a ViewController, which has two Container Views. The top one is the main content. The bottom one is a banner that will hide/show on certain events. The bottom one is positioned such that it is under the tab bar until the event occurs. When the event occurs, the frame of the main view is shrank and the frame of the banner is repositioned, such that it appears to 'slide' into the view and become available. The problem I'm having is, unless I resize the main view in the storyboard

iPhone: Manage frameworks according to ios versions

我们两清 提交于 2019-12-24 18:54:34
问题 In my iPad App, I have done coding for twitter. For ios version 4.0,4.1,4.2 and 4.3. And ios version 5.0. I have done separate coding for twitter. if([[[UIDevice currentDevice] systemVersion] floatValue]>=5.0) like this. The problem is when I run the code in ios 4.x it crashes with result could not load the twitter framework that I include in XCode. So, How do I manage this frameworks in my app. It's Deployement Target is 4.0. It's Base SDK is 5.0. 回答1: You must check that the Twitter

Connect Activity Indicator to prototype cells?

霸气de小男生 提交于 2019-12-24 18:15:09
问题 Hey Guys i wanted to connect a activity indicator to my prototype cell but then i got an error-message that says "Connection activityIndicator cannot have a prototype object as destination". Is it somehow possible to add a activity indicator to a prototype cell ? 回答1: I had an outlet inside the tableviewController connected to my activity indicator. After disconnect the outlet no error message occurs. 来源: https://stackoverflow.com/questions/13381002/connect-activity-indicator-to-prototype

How to send the build to already provisioned remote person's iPhone

我是研究僧i 提交于 2019-12-24 18:13:10
问题 We have provisioned 3 devices for our iPhone development. 2 developers and one manager phones. When the manager used to be here, we used to connect his phone to our mac and share the build with him. He is working remotely now. How shall I send the build to him now. His device is already provisioned and he is now running old version of our app (under development). We need to update his phone with the new build. We are using XCode4.2 and Lion. Please help. 回答1: You could do you own OTA setup:

Save UIImage as 8-bit Grayscale Bitmap

核能气质少年 提交于 2019-12-24 17:31:21
问题 I am trying to output a UIImage to an 8-bit grayscale bitmap, but I'm not very familiar with image manipulation, so I am at a loss on how to do this. I followed this stackoverflow post (Objective C - save UIImage as a BMP file) to create a UIImage category which can successfully generated a RGB 32-bit image, but I have been unable to manipulate the code to get it to output it in 8-bit grayscale. I am trying to get the raw bytes for this image in order to pass on to a provided C library. Does

Set CALayer Gradient Background

对着背影说爱祢 提交于 2019-12-24 17:06:40
问题 I am trying to add a gradient to a CALayer I have created. I can set the background colour of the CALayer with the following: self.colorLayer = [CALayer layer]; [self.colorLayer setBackgroundColor:color.CGColor]; [self.colorView setWantsLayer:YES]; [self.colorView setLayer:self.colorLayer]; I've looked around with no success (surprisingly I thought this would have been answered many times). I have made a gradient with: NSGradient *gradient = [[NSGradient alloc] initWithStartingColor:[NSColor

Obj-C, Reference-counted object is used after it is released?

家住魔仙堡 提交于 2019-12-24 16:18:18
问题 I`m getting the following warning. Reference-counted object is used after it is released ARC is enabled for this file. I have not converted my app to use ARC and don`t have an proper understanding of it at this time. However, at a glance I am puzzled why this code should have a problem (its from a library), I mean I know autorelease should not be used here? NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; id uuid = [defaults objectForKey:@"uniqueID"]; if (uuid) uniqueID =

Custom keyboard layout in Cocoa Touch?

主宰稳场 提交于 2019-12-24 16:16:21
问题 I am currently working on a BrainFuck interpreter for the iPhone. Seeing as BrainFuck only has eight commands, I want to create a custom nine-button (eight commands + backspace) keypad that will be showed instead of the standard iPhone keyboard. Is there any easy way of doing this? Thanks, amit ron- 回答1: As far as I can tell, there's no "officially authorized" way to do this. The thread here is a good discussion of a variety of ways it can be done. Also, the iPhone SDK agreement specifically

How to set custom UINavigationBarButton color

♀尐吖头ヾ 提交于 2019-12-24 16:10:03
问题 I'm trying to set a custom color for a button on my UINavigationBar, but only when a particular UIViewController is being displayed in it (I know this is dubious UI design, but it's a specific customer requirement). Our current implementation uses a Swizzle to override drawRect for all UINavigationBar objects. This is necessary so our custom navigation bar colors are applied to standard iOS screens (like when adding a new contact through standard APIs). I want to change the tint color of the

iOS Development - Check Internet Time

谁说我不能喝 提交于 2019-12-24 15:19:47
问题 I am developing an app that has refills lives every 5 minutes. What is the best way to check the time since the last refill so that the user cannot trick the system by changing the time on their device? For an example, look at Candy Crush. Changing the system time on there gives you extra lives, and this is what I need preventing. 回答1: How about running an [NSTimer scheduledTimerWithTimeInterval:300.0 target:self selector:@selector(giveLife:) userInfo:nil repeats:YES]; That should execute