ios10

How to put a collection view in the navigation bar like in iMessage group chats

梦想与她 提交于 2021-02-19 06:06:26
问题 I'm attempting to put a collection view within the navigation bar, as seen in iMessage group chats where all members have their initials in circles in the nav bar. I found an answer here on SO and I did my best to convert it to iOS10/Swift 3, but the collection view cells are not showing up in the nav bar correctly. Here's my code: import UIKit weak var collectionView: UICollectionView? class ChatController: UIViewController, UICollectionViewDelegate, UICollectionViewDataSource { override

How to put a collection view in the navigation bar like in iMessage group chats

☆樱花仙子☆ 提交于 2021-02-19 06:05:26
问题 I'm attempting to put a collection view within the navigation bar, as seen in iMessage group chats where all members have their initials in circles in the nav bar. I found an answer here on SO and I did my best to convert it to iOS10/Swift 3, but the collection view cells are not showing up in the nav bar correctly. Here's my code: import UIKit weak var collectionView: UICollectionView? class ChatController: UIViewController, UICollectionViewDelegate, UICollectionViewDataSource { override

Cant change navigation bar height ios 11

微笑、不失礼 提交于 2021-02-18 19:12:27
问题 I cant change navigation bar frame in ios 11. Here is sample of my code for ios 10: if let navigationBar = self.navigationController?.navigationBar { let frame = CGRect(x: navigationBar.frame.origin.x, y: navigationBar.frame.origin.y, width: navigationBar.frame.width, height: navigationBar.frame.height + 100) navigationBar.frame = frame } ios 10 and ios 11 screenshots respectively 回答1: Changing the height of the UINavigationBar is no longer directly supported in iOS 11 (see here, here & here)

Firebase Database setValue: or removeValue failed: permission_denied iOS

a 夏天 提交于 2021-02-16 16:16:11
问题 I'm trying to write data to Firebase Database but I keep receiving the following error when my saved button is pressed. 2016-12-02 11:09:42.548 StartupNow[1482:60415] [FirebaseDatabase] setValue: or removeValue: at /test/-KY-VpLZWbp4vjF3BpMk failed: permission_denied Things I've tried: I've made sure my .read and .write rules were set to true in my console, reconnected my savedButtonPressed button, and wrote the Firebase reference in a function and called it in my savedButtonPressed() method.

UIcollectionView cellForItemAtIndexPath returns Null in iOS 10 only. Works fine in iOS 9 and iOS 8

故事扮演 提交于 2021-02-07 09:21:06
问题 I have an app that been happily shipping for a couple of years. It retrieves RSS Feeds in a UICollectionView. The cellForItemAtIndexPath method sets text and calls a datasource method to load an image from a link specified in the feed. If none exists it loads the web page data and searches for <img> tags to get an image. Once the image is found/loaded the delegate method is called to add the image to the cell. (below) When running in iOS 8 and 9 everything is happy, but when running in iOS 10

UIcollectionView cellForItemAtIndexPath returns Null in iOS 10 only. Works fine in iOS 9 and iOS 8

本秂侑毒 提交于 2021-02-07 09:19:03
问题 I have an app that been happily shipping for a couple of years. It retrieves RSS Feeds in a UICollectionView. The cellForItemAtIndexPath method sets text and calls a datasource method to load an image from a link specified in the feed. If none exists it loads the web page data and searches for <img> tags to get an image. Once the image is found/loaded the delegate method is called to add the image to the cell. (below) When running in iOS 8 and 9 everything is happy, but when running in iOS 10

iOS 10 breaks custom CIFilter

和自甴很熟 提交于 2021-02-07 08:29:16
问题 I have written a chromakey filter for making the backgrounds of MPEG movies transparent so that you can use a movie file for longer animations without the need for lengthy sequences of PNGs (as is commonly done for some types of iOS animations). I am using AVPlayer , AVVideoComposition , and a custom CIFilter to render the video over a background image. The background image can be changed dynamically by the user interacting with the app. This used to work just fine until iOS 10 came out and

iOS 10 breaks custom CIFilter

↘锁芯ラ 提交于 2021-02-07 08:28:36
问题 I have written a chromakey filter for making the backgrounds of MPEG movies transparent so that you can use a movie file for longer animations without the need for lengthy sequences of PNGs (as is commonly done for some types of iOS animations). I am using AVPlayer , AVVideoComposition , and a custom CIFilter to render the video over a background image. The background image can be changed dynamically by the user interacting with the app. This used to work just fine until iOS 10 came out and

iOS 10 breaks custom CIFilter

拟墨画扇 提交于 2021-02-07 08:28:34
问题 I have written a chromakey filter for making the backgrounds of MPEG movies transparent so that you can use a movie file for longer animations without the need for lengthy sequences of PNGs (as is commonly done for some types of iOS animations). I am using AVPlayer , AVVideoComposition , and a custom CIFilter to render the video over a background image. The background image can be changed dynamically by the user interacting with the app. This used to work just fine until iOS 10 came out and

Sending photo using MFMessageComposeViewController is disabled in ios10

让人想犯罪 __ 提交于 2021-01-06 07:22:01
问题 I have message send functionality in my app and implemented the same using MFMessageComposeViewController. I am able to attach photos with the message in iOS9 but not in iOS 10? Is there anyone having the same issue? 回答1: Swift 5.0 version: Call the below method named displayMessageInterface : - Important to note: composeViewController.addAttachmentData(dataImage!, typeIdentifier: "image/png", filename: "ImageData.png") In the above line, filename must be of type abc.png in my case or abc