Skip to content

Releases: oscbyspro/DiffableTextViews

v4.0.0

09 May 09:49
Compare
Choose a tag to compare

Much wow. Such amaze. Very impress.

Added

  • Optional numbers #86 #92
  • SwiftUI-esque environment values #89
  • Placeholder text #87

Removed

  • ProxyTextField #89

Fixed

  • Disabled marked text (not text selection) #88

Environment

environment(\.locale, _:)
environment(\.layoutDirection, _:)
diffableTextViews_disableAutocorrection(_:)
diffableTextViews_font(_:)
diffableTextViews_foregroundColor(_:)
diffableTextViews_multilineTextAlignment(_:)
diffableTextViews_onSubmit(_:)
diffableTextViews_submitLabel(_:)
diffableTextViews_textContentType(_:)
diffableTextViews_textFieldStyle(_:)
diffableTextViews_textInputAutocapitalization(_:)
diffableTextViews_tint(_:)

Improved names and type aliases

NumberTextStyle<T> // _NumberTextStyle<T.NumberTextFormat>
T.NumberTextStyle  // _NumberTextStyle<T.NumberTextFormat>

NumberTextStyle<T>.Percent // _NumberTextStyle<T.NumberTextFormat.Percent>
T.NumberTextStyle .Percent // _NumberTextStyle<T.NumberTextFormat.Percent>

NumberTextStyle<T>.Currency // _NumberTextStyle<T.NumberTextFormat.Currency>
T.NumberTextStyle .Currency // _NumberTextStyle<T.NumberTextFormat.Currency>
NumberTextStyle<T?> // _OptionalNumberTextStyle<T.NumberTextFormat>
T?.NumberTextStyle  // _OptionalNumberTextStyle<T.NumberTextFormat>

NumberTextStyle<T?>.Percent // _OptionalNumberTextStyle<T.NumberTextFormat.Percent>
T?.NumberTextStyle .Percent // _OptionalNumberTextStyle<T.NumberTextFormat.Percent>

NumberTextStyle<T?>.Currency // _OptionalNumberTextStyle<T.NumberTextFormat.Currency>
T?.NumberTextStyle .Currency // _OptionalNumberTextStyle<T.NumberTextFormat.Currency>

v3.6.0

21 Apr 07:52
Compare
Choose a tag to compare

DiffableTextField now behaves more like SwiftUI.TextField.

Dismisses keyboard on submit

DiffableTextField now automatically dismisses the keyboard on submit.

Triggers stack

The following methods now stack:

 onSetup(of:\_:)
onUpdate(of:\_:)
onSubmit(of:\_:).

This behavior is opted out of by using:

 onSetupScope(of:)
onUpdateScope(of:)
onSubmitScope(of:),

similar to SwiftUI’s modifier submitScope().

v3.5.1

18 Apr 09:21
Compare
Choose a tag to compare

So proper. Very maintainable. Wow.

v3.5.0

15 Apr 04:46
Compare
Choose a tag to compare

Everything about it is simpler and easier to maintain.

v3.4.2

04 Apr 12:23
Compare
Choose a tag to compare

Cleanup n’ stuff. Such effort. Much wow.

v3.4.1

03 Apr 09:40
Compare
Choose a tag to compare

Unit tests now compile on tvOS...

v3.4.0

03 Apr 09:11
Compare
Choose a tag to compare

DiffableTextViews is now available on the following UIKit compatible platforms:

  • iOS 15.0+
  • iPadOS 15.0+
  • Mac Catalyst 15.0+
  • tvOS 15.0+

v3.3.2

02 Apr 07:11
Compare
Choose a tag to compare

Reworked the effect of .equals(_:) as described by #78

DiffableTextField now discards new styles when equal.

  • the behavior without .equals(_:) is unchanged
  • poor use of .equals(_:) can no longer result in an invalid state
  • .equals(_:) can now be used to determine when the view’s style is updated

Example: .equals(())

The first style is accepted, while subsequent styles are discarded without comparison.

Example: .equals(proxy)

The first style is accepted, while subsequent styles are discarded unless the their proxies are dissimilar.

v3.3.1

01 Apr 13:34
Compare
Choose a tag to compare

Changes

  • Added a disclaimer about the use of .equals(\_:).
  • Made the type of style.equals(()) available as Style.EqualsVoid.

v3.3.0

01 Apr 11:46
Compare
Choose a tag to compare

Changes to ConstantTextStyle

Problem: .constant() applied the effect of .equals(()).

  • .constant() now only prevents changes via .locale(_:)
  • the previous behavior is now written as.constant().equals(())

Implementation details in preparation of opaque type constraints #74

  • DiffableTextStyleXiOS was reduced into DiffableTextStyle
  • DiffableTextViewsXiOS was split into DiffableTextViewsXiOS and DiffableTextKitXiOS