ios8

UICollectionView cell views overlapping

风流意气都作罢 提交于 2019-12-11 04:06:37
问题 I have cells overlapping like so: my cellForItemAtIndexPath is as such: func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell { let cell = collectionView.dequeueReusableCellWithReuseIdentifier("Cell", forIndexPath: indexPath) as UICollectionViewCell cell.backgroundColor = UIColor(red: 27.0/255.0, green: 38.0/255.0, blue: 52.0/255.0, alpha: 1.0) let textFrame = CGRect(x: 0, y: cell.frame.height * 0.30, width: cell.frame

Typing in UISearchBar crashes my app

眉间皱痕 提交于 2019-12-11 04:03:10
问题 UPDATE 2 My app is crashing when presenting it modally after a user taps a button in ViewController1. In my storyboard, I have a standard present modally segue set to pop up the UINavController/UITableViewController containing the UISearchBar . That's failing every time. However, in my AppDelegate , if I set the window's rootViewController to the same UINavController/UITableViewController, everything works as expected. For some reason transitioning via segue and then acting the UISearchBar is

CGAffineTransformMakeScale() distorting view frame after animation

痴心易碎 提交于 2019-12-11 03:58:42
问题 I'm animating a view to make it appear as it is growing from the center of the screen with a theCGAffineTransformMakeScale(), it works fine in the iOS 8 beta 4 simulator but on the 7.1 version it distorts the frame of the view. view.alpha = 0.0f; view.transform = CGAffineTransformMakeScale(0.95f, 0.95f); [UIView animateWithDuration:0.5f delay:0.0f usingSpringWithDamping:1.0f initialSpringVelocity:1 options:0 animations:^{ view.alpha = 1.0f; view.transform = CGAffineTransformMakeScale(1.0f, 1

Get a Week From a Different Starting Day

筅森魡賤 提交于 2019-12-11 03:57:32
问题 Before I try this with my approach (which I have a feeling is simplistic and too drawn out), I wanted to ask anyone if there is an easier / more direct way in Swift. The task is to let the user pick any day in the calendar. So let's say they pick Tuesday a month ago. Now I want to put that entire week into an array. So the Monday before, then Tues, then Wednesday, Thurs, Fri, Sat, Sun. So the array would always hold 7 days. Here is the thing - I'd like to change this up so the user can define

FileReader not working on iOS 8

浪子不回头ぞ 提交于 2019-12-11 03:57:23
问题 I can't get FileReader to work in iOS 8. The following demo illustrates this (jsFiddle link for iOS - http://jsfiddle.net/gys6rubg/1/): var file = document.getElementById('file-input'); file.addEventListener('change', function(event) { var file = this.files[0]; if(!file) { alert('No file'); return; } var reader = new FileReader(); var timeout = setTimeout(function() { alert('FileReader not functioning'); }, 500); reader.onload = function(event) { clearTimeout(timeout); alert('Base64 length -

Automatically Reload TableViewController On Rewind

青春壹個敷衍的年華 提交于 2019-12-11 03:56:33
问题 I am working on an app where it starts out at a tableViewController which loads and displays data stored in a Realm database. I have it so I can create a new entry in my Realm database in a separate scene and the save button unwind segues back to the initial tableView. I current have it so the tableViewController will reload the tableView on pull down (something I Learned here, second answer down) but I would be better if the tableView would reload its self automatically upon unwind,

How to Navigate from Initial UIViewController to UISplitViewController in Swift

心不动则不痛 提交于 2019-12-11 03:56:09
问题 I am showing my details in UISplitViewController in AllVisible mode. But, before that, loginViewController is there. User should login, then it will navigate UISplitViewController. I don't know how to navigate to that viewController. I am not using any UINavigationController inside my app. I have tried something, but failure. I used following code: Code: //ATTEMPT 1: self.performSegueWithIdentifier("split", sender: self) //ATTEMPT 2: let leftVC = atlMasterVC() let detailVC = atlDetailVC() let

Text not fitting in UILabel Swift

青春壹個敷衍的年華 提交于 2019-12-11 03:49:55
问题 i am getting json data into uiwebview(which is added through storyboard) and if the json data is empty i am adding a subview(which is added programatically).and in that subview i am adding a label. when i run it i can see the subview and the label but its size is big, so it goes out of the subview. The code i have is var detailView = UIView(frame: CGRectMake(0, 143, 568, 376)) //Overlapping the UIWebview //detailView.backgroundColor = UIColor.blackColor() detailView.contentMode =

Validation Error: Invalid Bundle. The bundle at … contains disallowed file 'Frameworks'

蓝咒 提交于 2019-12-11 03:48:10
问题 I'm getting these 2 errors when I try to submit my app with a today extension on Xcode 6.1 GM. I've tried both of these solutions but neither of them work: Validation Error: Invalid Bundle. The bundle at … contains disallowed file 'Frameworks' Validation Error: Invalid Bundle. The bundle at … contains disallowed nested bundles Both the app and the today extension are written in Swift. I've tried cleaning the project and deleting Xcode derived data but I'm still getting the same 2 errors. Any

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