ios6

Applying gradient to UIImage - how to remove color invertion?

[亡魂溺海] 提交于 2019-12-11 01:41:54
问题 I'm applying gradient to UIImage , all i want it to be dark on the bottom and slowly turn to clear or light gray in the middle. It is mostly ok, but i have a problem that my image colors invert in some places under this gradient. This looks very annoying. How do i resolve that? Here is my method for your convenience. I have tried picking different blending modes, but it doesn't help. Another question, is how do I make black more intensive in the bottom? This method will work without any extra

How would you providing routing for directions between points on a map? What are the missing pieces?

隐身守侯 提交于 2019-12-11 01:34:45
问题 With iOS 6 the Maps app is dropping Google Maps. The terms of the Google Maps SDK states that if you plot directions with their service you must show it on their map. Since this will no longer be the case I need to explore other options to get directions and display routes on a map. I have found that MapQuest and Nokia each offer an API to provide direction and routing services. MapQuest - http://open.mapquestapi.com/directions/ Nokia - http://api.maps.nokia.com/en/apireference/2.2.0/symbols

Autolayout works fine on iOS 8, but doesn't behave well on iOS 6 and 7 (I'm using XCode 6.2)

こ雲淡風輕ζ 提交于 2019-12-11 01:33:50
问题 I'm using autolayout to correctly lay out some views inside a UICollectionViewCell. It works fine with iOS 8, but when I try to run it on iOS 7 or iOS 6, the cells appearance varies widely everytime they are laid out (sometimes I see small changes in size and positions - one or two pixels - and sometimes big changes, resulting in some pretty messed up cells). I swear I tried hard to find anyone with the same problem, but I couldn't. I didn't find any answer that could help me solve or even

How do display a UIAlertView from a block on iOS?

梦想的初衷 提交于 2019-12-11 01:29:05
问题 What is the best way of displaying a UIAlertView from a block? I have the following action in my code : - (IBAction)connectWithTwitterClicked:(id)sender { ACAccountStore * account = [[ACAccountStore alloc]init]; ACAccountType * accountType = [account accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierTwitter]; [account requestAccessToAccountsWithType:accountType options:nil completion:^(BOOL granted, NSError *error) { if (granted == YES){ NSLog(@"Twitter account has been granted");

IOS Custom UIBarbuttonItem change position in detail view

偶尔善良 提交于 2019-12-11 01:24:49
问题 I'm trying to customize my navigationbar's UIBarbuttonItem so that I'm using this im my Appdelegate.m // didFinishLaunchingWithOptions: { UIImage *navBarImage = [UIImage imageNamed:@"nav-bar.png"]; [[UINavigationBar appearance] setBackgroundImage:navBarImage forBarMetrics:UIBarMetricsDefault]; [[UINavigationBar appearance] setTitleVerticalPositionAdjustment:5 forBarMetrics:UIBarMetricsDefault]; UIImage *barButtonSave = [[UIImage imageNamed:@"nav-bar-button.png"] resizableImageWithCapInsets

how to keep running NSTimer when app goes in background

拈花ヽ惹草 提交于 2019-12-11 01:14:02
问题 I am creating puzzle game application and in that I am displaying time (i.e 01:20) using NSTimer. NSTimer is paused when application gone in background but i want to continue it even application is in background state. for example timer count is 15 sec when app gone in background and I put it for 5 sec and become in foreground now I need to timer count changes to 20 sec I have searched a lot but didn't get good answer. So Please suggest me how can I achieve this. 回答1: Don't think of a timer

FacebookSDK in iOS Does not show close button and not able to close

和自甴很熟 提交于 2019-12-11 00:52:29
问题 Hi I have integrated Facebook SDK for an iOS 6 app.The Facebook authentication & sharing works perfectly but there are no provision to close the FB Dialogue box.ie. When FB Dialogue box opens,it will be closed only after authentication success.No provision to close or navigate back.How can I make a close button.The code snippet I am using has been shown below.Thanks in Advance. -(NSDictionary *)shareFacebook { NSDictionary *userInfo; if (FBSession.activeSession.isOpen) { if (FBSession

dynamic data in coreplot iOS on x-axis and y-axis

懵懂的女人 提交于 2019-12-11 00:52:03
问题 how to have dynamic data in x-axis/y-axis in coreplot iOS :Currently using the demo code here:Below every column I need year on x-axis which itself is dynamic and y axis revenue amount .How do I do that dynamically? // // CPDStockPriceStore.m // CorePlotDemo // // NB: Price data obtained from Yahoo! Finance: // http://finance.yahoo.com/q/hp?s=AAPL // http://finance.yahoo.com/q/hp?s=GOOG // http://finance.yahoo.com/q/hp?s=MSFT // // Created by Steve Baranski on 5/4/12. // Copyright (c) 2012

How to programmatically select a UITextField for editing

僤鯓⒐⒋嵵緔 提交于 2019-12-11 00:36:12
问题 I have a UITextField that I need to select programmatically so when the user taps on a date in a UIDatePicker, it will be sent to that UITextField. This is the code I have, which does not select the UITextField; I have tried all possible combinations of UIControlEvent , but none of them work. Any other ideas? // set textField parameters if([whichTextField isEqualToString:@"oStartTime"]) { oStartTime.backgroundColor = [UIColor colorWithRed:252.0/255.0 green:255.0/255.0 blue:197.0/255.0 alpha:1

How to see the tag of a programmatically created UIButton

梦想的初衷 提交于 2019-12-10 23:23:59
问题 on one viewController of my app there is a long list of 20 or so buttons added programmatically, all which i want to call the same method, but to identify themselves through their button tag, but i ran into a problem that has set me back a few hours of research and attempts.The basic problem is i dont quite know how to access a programmatically created button in any other method than the method that they were initialized in. My questions summerized: 1) if i were to create the button in the