Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

490
Visualizações
Swift: error de restricciones de UIActivityController en iOS15.4

Estoy tratando de mostrar un UIActivityViewController en mi aplicación. Funciona bien en el iPhone, pero tengo un par de problemas con las limitaciones:

 2022-03-17 20:49:29.744955+0100 Instagrid[50308:1307722] [LayoutConstraints] Changing the translatesAutoresizingMaskIntoConstraints property of a UICollectionReusableView that is managed by a UICollectionView is not supported, and will result in incorrect self-sizing. View: <_UIActivityContentFooterView: 0x1206246f0; baseClass = UICollectionReusableView; frame = (20 506; 374 52); layer = <CALayer: 0x600001e7a400>> 2022-03-17 20:49:29.748855+0100 Instagrid[50308:1307722] [default] -imageForImageDescriptor: can do IO please adopt -imageForDescriptor: for IO free drawing or -prepareImageForDescriptor: if IO is allowed. (This will become a fault soon.) 2022-03-17 20:49:29.763300+0100 Instagrid[50308:1307722] [LayoutConstraints] Unable to simultaneously satisfy constraints. Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. ( "<NSLayoutConstraint:0x600003d48280 _UIActivityActionCellTitleLabel:0x12062edd0.height >= 22 (active)>", "<NSLayoutConstraint:0x600003d0b0c0 UIView:0x12062def0.height >= _UIActivityActionCellTitleLabel:0x12062edd0.height + 30 (active)>", "<NSLayoutConstraint:0x600003d39540 'UIView-Encapsulated-Layout-Height' UIView:0x12062def0.height == 30 (active)>" ) Will attempt to recover by breaking constraint <NSLayoutConstraint:0x600003d48280 _UIActivityActionCellTitleLabel:0x12062edd0.height >= 22 (active)>

Extrañamente, este problema aparece solo en iOS 15. Cuando pruebo mi código en iOS 14 e iOS 13, no recibo este error.

¿Alguien tiene algún consejo/acción para resolver este problema?


EDIT 1 - Código que activa el UIActivityViewController

 let imageToShare = pictureView.renderAsUIImage() let sharingObject = [imageToShare] let activityViewController = UIActivityViewController(activityItems: sharingObject, applicationActivities: nil) present(activityViewController, animated: true) func renderAsUIImage() -> UIImage { let renderer = UIGraphicsImageRenderer(size: self.bounds.size) return renderer.image { context in self.drawHierarchy(in: self.bounds, afterScreenUpdates: true) } }
over 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda