profile
viewpoint
Bryn Bodayle brynbodayle iOS @Airbnb San Francisco, CA http://www.brynbodayle.com

brynbodayle/BABFrameObservingInputAccessoryView 113

A simple view which allows for an iOS Messages style keyboard input view and panning behavior.

brynbodayle/BABCropperView 85

A customizable image cropper view based on UIScrollView.

brynbodayle/Auto-Layout-Demo 4

A demo project for my Nashville CocoaHeads talk entitled "Auto Layout in Practice: Making Life Easier" given on 3/30/16.

brynbodayle/BABAudioPlayer 4

A convenience layer on top of AVPlayer for playing audio files on iOS

brynbodayle/aima-objc 1

An Objective-C library for the Artificial Intelligence a Modern Approach library

brynbodayle/AYVibrantButton 1

A stylish button with iOS 8 vibrancy effect

brynbodayle/DragDropSampleProject 1

A sample project demonstrating how to use OBDragDrop to drag and drop items between UICollectionViewCells.

brynbodayle/RxSwift 1

Reactive Programming in Swift

Pull request review commentairbnb/HorizonCalendar

Bk/inset support

 public final class CalendarView: UIView {     }   } +  public override func layoutMarginsDidChange() {+    setNeedsLayout()

Feels like good practice to call super even if the docs say it doesn't do anything.

bryankeller

comment created time in 7 days

Pull request review commentairbnb/HorizonCalendar

Bk/inset support

 Features: - A day selection handler to monitor when a day is tapped - Customizable layout metrics - Pinning days of the week to the top-- Showing partial boundary months (exactly 2020-03-14 to 2020-04-20, for example)-- Scrolling to arbitrary dates and months, with or without animation+- Show partial boundary months (exactly 2020-03-14 to 2020-04-20, for example)

grammar++

bryankeller

comment created time in 7 days

Pull request review commentairbnb/HorizonCalendar

Bk/fix scroll to item bug

 final class VisibleItemsProvider {     }   } +  private func correctedScrollToItemFrameForContentBoundaries(

unclear to me what the correction we're applying here is

bryankeller

comment created time in a month

Pull request review commentairbnb/HorizonCalendar

Bk/partial month visibility

 extension MonthsLayout: Equatable {    public static func == (lhs: MonthsLayout, rhs: MonthsLayout) -> Bool {     switch (lhs, rhs)  {+    case (.vertical(let lhsOptions), .vertical(let rhsOptions)): return lhsOptions == rhsOptions     case (.horizontal, .horizontal): return true-    case (.vertical(let l), .vertical(let r)): return l == r     default: return false     }   }  }++// MARK: - VerticalMonthsLayoutOptions++/// Layout options for a vertically-scrolling calendar.+public struct VerticalMonthsLayoutOptions: Equatable {

Thoughts on using an option set here instead? Might be a little more straightforward to use in the API.

bryankeller

comment created time in a month

Pull request review commentairbnb/HorizonCalendar

Bk/partial month visibility

+// Created by Bryan Keller on 6/23/20.+// Copyright © 2020 Airbnb Inc. All rights reserved.++import HorizonCalendar+import UIKit++// MARK: - PartialMonthVisibilityDemoViewController++final class PartialMonthVisibilityDemoViewController: UIViewController, DemoViewController {++  // MARK: Lifecycle++  init(monthsLayout: MonthsLayout) {+    self.monthsLayout = monthsLayout+    super.init(nibName: nil, bundle: nil)+  }++  required init?(coder: NSCoder) {+    fatalError("init(coder:) has not been implemented")+  }++  // MARK: Internal++  override func viewDidLoad() {+    super.viewDidLoad()++    title = "Partial Month Visibility for Vertical Months Layout"++    if #available(iOS 13.0, *) {+      view.backgroundColor = .systemBackground+    } else {+      view.backgroundColor = .white+    }++    calendarView.daySelectionHandler = { [weak self] day in+      guard let self = self else { return }++      self.selectedDay = day+      self.calendarView.setContent(self.makeContent())+    }+    view.addSubview(calendarView)++    calendarView.translatesAutoresizingMaskIntoConstraints = false+    switch monthsLayout {+    case .vertical:+      NSLayoutConstraint.activate([+        calendarView.topAnchor.constraint(equalTo: view.layoutMarginsGuide.topAnchor),+        calendarView.bottomAnchor.constraint(equalTo: view.layoutMarginsGuide.bottomAnchor),+        calendarView.leadingAnchor.constraint(+          greaterThanOrEqualTo: view.layoutMarginsGuide.leadingAnchor),+        calendarView.trailingAnchor.constraint(+          lessThanOrEqualTo: view.layoutMarginsGuide.trailingAnchor),+        calendarView.centerXAnchor.constraint(equalTo: view.centerXAnchor),+        calendarView.widthAnchor.constraint(lessThanOrEqualToConstant: 375)+      ])+    case .horizontal(let monthWidth):+      NSLayoutConstraint.activate([

Maybe we could add an alert that pops up when you open this config indicating that it does nothing since this option only works for .vertical layouts.

bryankeller

comment created time in a month

startedairbnb/HorizonCalendar

started time in 2 months

more