ios6

AppleKeyboards in iOS6

淺唱寂寞╮ 提交于 2019-12-12 03:56:29
问题 I used AppleKeyboards to get users' keyboard setting before iOS6: NSArray * keyboards = [[NSUserDefaults standardUserDefaults] objectForKey:@"AppleKeyboards"]; for (int i = 0; i < [keyboards count]; i++) { NSLog(@"%@", [keyboards objectAtIndex:i]); } But after iOS6, I can't use AppleKeyboards as key for the user setting. Is there any solution for this? Thanks! 回答1: You can use UITextInputMode Class to get current text input mode by "+ (UITextInputMode *)currentInputMode". see also: https:/

Subview disappears with auto layout

笑着哭i 提交于 2019-12-12 03:42:45
问题 I just added a UIView as subview to the main UIView on interface builder (basic single view application). Without setting any constraints, my subview disappears. subview's frame = (0 0; 320 0); Why is that? If I try to add some constraints like for trailing space, leading space, top space and bottom space to be fixed, still my view disappears. How can I solve this? Thank you. Just to clarify thing a little I created a test project (single view application), and added 2 subview to the main

FBLoginView iPhone View

↘锁芯ラ 提交于 2019-12-12 03:38:56
问题 Using the FBLoginView in the current 3.1 Facebook SDK doesn't produce what I believe it should be producing as an output. Generating a basic [[FBLoginView alloc] init]; and the frame the size of the current view controllers frame, it only shows the below WITHOUT the "Login" button: http://cl.ly/image/1t102j1t452l What does it take to make the FBLoginView show properly? 回答1: Try this: In .h file: Use this delegate <FBLoginViewDelegate> FBLoginView *loginview; In.m file in someMethod: if(

custom UIView how-to with IB / Xcode 4.5.1 and iOS Simulator 6.0

ⅰ亾dé卋堺 提交于 2019-12-12 02:57:55
问题 I know that there are several questions similar to this but I am finding that most of them don't work with current IB / iOS or are not complete. I want to have a custom UIView that has a nib but am failing of getting this hooked up properly. I have spent several hours debugging and off to SO I go (and maybe sit in bathtub). Apologies in advance if you feel that this is a simple operation; thx in advance for any help. To do this currently, I: Create custom view files: File -> New -> File ->

iOS 6.0- UIAlertView failed to addSubview. Works fine in lower version

感情迁移 提交于 2019-12-12 02:32:14
问题 This is my code to show the table view inside alert view. Its working perfectly in iOS 5.1. But in iOS 6.0 it doesnt show the table view inside alert view. UIAlertTableView.h #import <UIKit/UIKit.h> @class UIAlertView; @interface UIAlertTableView : UIAlertView { // The Alert View to decorate UIAlertView *alertView; // The Table View to display UITableView *tableView; // Height of the table int tableHeight; // Space the Table requires (incl. padding) int tableExtHeight; id

How to get image( using CGContext ) from the tableviewcell when tapped on the cell in iOS SDK

混江龙づ霸主 提交于 2019-12-12 02:27:02
问题 How to get imaged using CGContext same as the tableviewcell that I Tapped. I got the frame of the cell which I tapped. I had seen many examples of CGContext it only takes the size as the input and converting the image into that size. But I want to get the Image of the tableviewcell as it is with the same frame. Can anyone suggest me how can I do this. 回答1: I guess You need to club these two logic in appropriate place after your cell is being tapped. There is a method - (CGRect

iphone:UIToolbar when set to tint color behaves differently on iOS 5 and ios6 simulator?

走远了吗. 提交于 2019-12-12 01:57:14
问题 If I set the color of toolbar as tint color and run the application on ios5 simulator. It shows the color well. But when I run the same application on ios6 simulator, it show the toolbar color blurred? Please tell me how to resolve this issue. 回答1: i use the following code to change tint coor and background image of all toolbars and it workds perfect UIToolbar *dummyToolbar = [[UIToolbar alloc] init]; if ([dummyToolbar respondsToSelector:@selector(setBackgroundImage:forToolbarPosition

Accessing a database in Xcode

与世无争的帅哥 提交于 2019-12-12 01:34:01
问题 What is the best way to access a database in Xcode? I am attempting to build an app that requires people to login with correct credentials and get certain data from the server and display it in the app. Is there a way to write SQL in Xcode without it underlining red? To login would I access the php file with the login script? I am not asking how, I just want some advice and some useful tips and pointers in the right direction/any useful resources for what I am trying to do? Thanks for your

Support rotation in only one tab on both iOS 5 and 6

放肆的年华 提交于 2019-12-12 01:02:03
问题 My app is a scorekeeper with two tabs. Tab one is where scorekeeping actually takes place, and tab two contains history of past games. Only tab one supports rotation, and when rotating it hides its navigation and tab bars (there's not enough vertical space). I do not want to support rotation at all on the history tab, because the tabbar is hidden in the counter. It is quite jarring to switch tabs and then have the tab bar disappear. There are several types of games that may be displayed in

Register for SMS Notification

◇◆丶佛笑我妖孽 提交于 2019-12-12 00:55:50
问题 Can I register for SMS Notification through my application? All I want is to increase counter in my application when user is doing any SMS out of my application. 回答1: The sandbox nature of apps on the iOS platform prevents you from seeing what the other apps are doing. You will need to track what you are setting up with your MFMessageComposeViewController as you are helping them prepare to send an SMS message. But you can't tell if they added other recipients or deleted the ones you set up