ios6

iOS - Presenting a UIViewController inside anther UIViewController

馋奶兔 提交于 2020-01-05 06:39:13
问题 I dont have a very good understanding on the topic, so please bear with me I am trying to display a UIViewController inside another UIViewController. I feel like there aren't enough examples out there. I have read the documentation but being fairly new to iOS I am kind of lost. Here is my problem: I can get the child UIViewController to appear inside the parent UIViewController but the child view is not displaying right. Sorry, I cant post pictures yet. Here is my child - UIViewController.

in MKMapkit how to get the current location detail in textfield or tableview

人走茶凉 提交于 2020-01-05 06:37:20
问题 RootViewController *objYourViewController = [[RootViewController alloc] initWithNibName:@"RootViewController" bundle:nil]; CATransition* transition = [CATransition animation]; transition.duration = 1.0; transition.type = kCATransitionPush; transition.subtype = kCATransitionPush; [self.navigationController.view.layer addAnimation:transition forKey:kCATransition]; [self.navigationController pushViewController:objYourViewController animated:YES]; This is used to point the current location. Now i

predicateForEventsWithStartDate:endDate:calendars: EKEventStore doesn't work

拜拜、爱过 提交于 2020-01-05 04:55:09
问题 i have saved 28 EKEvent in a EKCalendar in this range date: 2012-01-01 and 2013-01-18, the EKEvent are all stored and i can see it in the iOS Calendar on iCloud, then i want retrieve all this EKEvent in the range 2012-01-01 and 2013-01-18 and i use this method of EKEventStore: predicateForEventsWithStartDate:endDate:calendars: that is a NSPredicate to fetch event in the calendar, i pass with start date 2012-01-01 and with endDate:2013-01-18 so the array that return me with the EKEvent have

AFJSONRequestOperation returns null response in iOS

谁都会走 提交于 2020-01-05 04:30:07
问题 I am facing 1 problem while using AFJSONRequestOperation. My API Client is as follows #import <Foundation/Foundation.h> #import "AFHTTPClient.h" #import "AFJSONRequestOperation.h" @interface MyAPIClient : AFHTTPClient + (MyAPIClient *)sharedAPIClient; @end // .m file #import "MyAPIClient.h" @implementation MyAPIClient + (MyAPIClient *)sharedAPIClient { static MyAPIClient *sharedClient = nil; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ sharedClient = [[MyAPIClient alloc]

UICollectionView - Change Location of Header

余生长醉 提交于 2020-01-04 14:07:05
问题 I have a UICollectionView that is using UICollectionViewFlowLayout to print a grid of cells to the screen. I configured the layout to flow horizontally & now I need to add a header to each section. My main issue is with the location of the header which is to the left of the section while I want it to be on top of the section (similar to what it would be if the layout was configured to flow vertically). Is there a way to do that short of creating my own UICollectionViewFlowLayout subclass? and

How to add shadow to UINavigationController

喜夏-厌秋 提交于 2020-01-04 11:11:41
问题 I want to create a Slide Menu like in Path or Facebook with a shadow between my menu and the UINavigationController with all the content inside. I can add rounded corners to the layer but the shadow I apply to the layer is not shown. What is wrong with that code? It is working if I use a UIViewController instead of the UINavigationController... (The code is inside a view added as rootViewController to the UINavigationController) The problem is that I don't want to loose the rounded borders of

How to add shadow to UINavigationController

左心房为你撑大大i 提交于 2020-01-04 11:11:13
问题 I want to create a Slide Menu like in Path or Facebook with a shadow between my menu and the UINavigationController with all the content inside. I can add rounded corners to the layer but the shadow I apply to the layer is not shown. What is wrong with that code? It is working if I use a UIViewController instead of the UINavigationController... (The code is inside a view added as rootViewController to the UINavigationController) The problem is that I don't want to loose the rounded borders of

Problems with multiple xibs for rotation under iOS6

陌路散爱 提交于 2020-01-04 06:22:46
问题 I need to use different xib files for portrait and landscape. I am not using Auto Layout but I am using iOS6. (See my previous question if you care why.) I'm following Adam's answer to this question modified with amergin's initWithNib name trick, modified with my own iPhone/iPad needs. Here's my code: -(void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration { [[NSBundle mainBundle] loadNibNamed:[self xibNameForDeviceAndRotation

UIToolbar items disappear - Weird bug in ios6

六月ゝ 毕业季﹏ 提交于 2020-01-04 04:34:15
问题 This is the current setup. I have the navigationController's toolbar with 5 buttons, and tapping on them hides the toolbar for 2 seconds, and then shows the toolbar again (except the 5th button - which brings up an actionsheet with buttons (ACTION & CANCEL)). On tapping on the 1-4 buttons, I do a self.navigationController.toolbarHidden = YES; and after exactly 2 seconds , I set the self.navigationController.toolbarHidden = NO; and this brings back the toolbar, and everything's fine. On

CoreBluetooth - Can connectPeripheral be called multiple times

為{幸葍}努か 提交于 2020-01-04 02:05:46
问题 Can an application attempt to connect to multiple devices at once? When an app calls 'connectPeripheral', it will attempt to connect for an unspecified amount of time since there is no time-out. However, if 'connectPeripheral' is called a second time, does it cancel out the previous call, or will the app attempt to make two separate connections at once? 回答1: In my testing I've seen if you call it multiple times prior to being connected, it will take longer to actually connect (and often