Errors in pages 205 , 207

Hi ,

there is some error in these pages

on page 205

This code :

gradientAnimation.repeatCount = Float.infinity

should be

gradientAnimation.repeatDuration = CFTimeInterval(Float.infinity)

and on page 207

These code :

let textAttributes: [NSAttributedStringKey: Any] = {
  let style = NSMutableParagraphStyle()
  style.alignment = .center
  return [
    NSFontAttributeName: UIFont(
      name: "HelveticaNeue-Thin",
      size: 28.0)!,
    NSParagraphStyleAttributeName: style
  ]
}()

Should be :

  let textAttributes: [NSAttributedStringKey: Any] = {
        let style = NSMutableParagraphStyle()
        style.alignment = .center
        return [
            NSAttributedStringKey.font: UIFont(
                name: "HelveticaNeue-Thin",
                size: 28.0)!,
            NSAttributedStringKey.paragraphStyle: style
        ]
    }()
1 Like

This should be on iOS Animations by Tutorials book section !
Sorry !

No worries, but you might want to consider deleting the post so as not to confuse others who might be reading the forums :slight_smile:

This topic was automatically closed after 166 days. New replies are no longer allowed.