ios7

Space between UICollectionViewCell rows

五迷三道 提交于 2019-12-11 04:08:44
问题 Currently I have a 9 items displayed in my collection. I want a 3*3 grid for each section I have. So when I want to go to the next section I scroll to the right and and I see the 3*3 grid for my next section. What I did to accomplish this was setting the height of the UICollection to 3*height_of_my_cell. I also made sure that: - (CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout minimumLineSpacingForSectionAtIndex:(NSInteger)section

Targetting ios 7 but supporting ios 5+ monotouch

人走茶凉 提交于 2019-12-11 04:01:15
问题 I have an application that targeted iOS7 at its info.plist file. Now I want to target iOS 7 . Also I have a plan to support iOS 5 and iOS 6 too. I mean that I want my clients be able to download my application whether they are running iOS 5.X or 6.X or iOS 7. Is it possible? 回答1: Yes that is certainly possible. You need to set the deployment target of your project to Version 5.0. To do that, open the Project Options, navigate to the "IOS Application" Tab and change the "Deployment Target"

RestKit .20.x value transformation

强颜欢笑 提交于 2019-12-11 03:57:43
问题 I am new to iOS development and am trying to do some custom value transformation in RestKit, but I can't figure out how to do it. I have two current problems: I have a base64 encoded image that is returning in a JSON message from the server. It is in the below format. I am using Core Data as the backend persistent store and the 'image' field is stored in Core Data as binary data (NSData). When RestKit transforms the base64 encoded image into an NSData object, something goes wrong because the

Backbarbuttonitem letterpress effect

≯℡__Kan透↙ 提交于 2019-12-11 03:56:51
问题 How can I recreate the letterpress-like effect applied to the backbarbuttonitem in the notes app in ios 7? I tried the following: NSShadow *textShadow = [[NSShadow alloc] init]; textShadow.shadowOffset = CGSizeMake(0.0, -1.0); textShadow.shadowColor = [UIColor blackColor]; NSAttributedString *attributedTitle = [[NSAttributedString alloc] initWithString:@"Back" attributes:@{NSForegroundColorAttributeName : [UIColor orangeColor], NSShadowAttributeName : textShadow}]; self.navigationItem

Change Playback Quality of YTPlayerView

你说的曾经没有我的故事 提交于 2019-12-11 03:45:30
问题 I am having a problem with quality for embedded YouTube videos in my app. I am using YTPlayerView to embed videos from YouTube. My app has 2 options: option 1 is the user can watch video with 360p quality and option 2 is 720p quality. Are these two options possible? If yes, can I customize the video playback quality of the YTPlayerView ? I tried to change the quality this way, but it does not appear to work: [self.playerView setPlaybackQuality:kYTPlaybackQualitySmall]; 回答1: I assume you are

How to give screen edge a physics body

…衆ロ難τιáo~ 提交于 2019-12-11 03:44:08
问题 I have a background sprite that I would like to give physics body. background.physicsBody = [SKPhysicsBody bodyWithRectangleOfSize:CGSizeMake(screenWidth , screenHeight)]; The problem is that the sprites are within the screen bounds and Im trying to detected collision with those sprites when they hit the edge of the screen. Instead its automatically detecting collision because my sprites are already within the physics body of the background. What do I do? Update:Above question is answered for

UITableView Separator appears in middle of Cell's View

…衆ロ難τιáo~ 提交于 2019-12-11 03:43:21
问题 I am using default iOS 7's TableView Separator. I have custom cells of varying height. When scrolled up and down frequently some of the smaller cells leave behind their separators(perhaps, not sure if this is the cause). So the bigger cell gets cut right in the middle most of the times by the separator. I have tried resetting cell's edge insets to their previous location but it does not seem to work -(void)prepareForReuse { [self setSeparatorInset:UIEdgeInsetsZero]; } 回答1: To avoid this use

Deadlock when changing first responder from uitextfield to uitextview [iOS 7]

六月ゝ 毕业季﹏ 提交于 2019-12-11 03:38:56
问题 have a really strange problem here, this did not happen before iOS 7... i have a uitextfield and uitextview in a form that i created... the problem is that if the user has the textfield as first responder then taps on the uitextview a deadlock happens, memory will increase until the watchdog kills my app.. This does not happen when I change from uitextview to uitextfield Relevant code: #pragma mark - UITextView Delegate -(BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange

UIStatusBar changes style for no apparent reason

倾然丶 夕夏残阳落幕 提交于 2019-12-11 03:36:23
问题 I have an app in which I set the UIStatusBarStyle to UIStatusBarStyleLightContent and it works perfectly fine for a while. Then, as suddenly than unexpectedly, it changes to UIStatusBarStyleDefault for no apparent reason. View controller-based status bar appearance property is set to NO . Is there a specific place which I should set the UIStatusBarStyle in? Currently I set it in - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions before

iOS 7 Application Crashing the whole iPad

一世执手 提交于 2019-12-11 03:33:34
问题 I am getting a very strange crash while using an application in iOS7. It's basically an eReader application that I am working on and while opening a book, and putting iPad to sleep, the whole iPad crashes!!! It just doesn't crash, it freezes completely and the user will have to hard reset it by pressing and holding the home and lock button. If they don't, the iPad will restart in 5 minutes but for that period, the iPad is completely frozen. I have spent numerous hours and checked to see if