zdavatz / AmiKo-iOS

AmiKo Desitin für iPhone und iPad
https://apps.apple.com/ch/app/amiko-desitin/id687642725
GNU General Public License v3.0
1 stars 2 forks source link

Add comment to Prescription. #7

Closed zdavatz closed 6 years ago

zdavatz commented 6 years ago

Suggestion: Use UITextField

  1. Longtap on Package should give two options a) edit Comment b) delete c) Cancel a) will open the keyboard so the user can type or dictate with Siri what he wants to say about that package. b) will delete that line with the package and the comments.
  2. Text should automatically be saved or like with the Messages App text can be saved by clicking on a small Icon.
zdavatz commented 6 years ago

See this for editable text fields

https://developer.apple.com/documentation/uikit/uitextfield?language=objc

and also see

https://developer.apple.com/documentation/uikit/touches_presses_and_gestures/coordinating_multiple_gesture_recognizers/preferring_one_gesture_over_another?language=objc

to get swiping working again.

zdavatz commented 6 years ago

Swiping is working again with commit: 36ba395499f6f2b34f634e5

zdavatz commented 6 years ago

Finetuning:

  1. Allow multiline entry. When you type a lot of text, the field should go down and not to the side.
  2. Make the Tap-Menu come up from the bottom.
  3. Nice-to-have: Shift+Enter should generate a new line.
zdavatz commented 6 years ago

Deleting works with 01a210c84a2219997

zdavatz commented 6 years ago

Regarding 1. see: https://stackoverflow.com/questions/38714272/how-to-make-uitextview-height-dynamic-according-to-text-length

zdavatz commented 6 years ago

Ahh, you asked about Slack. That one is indeed OpenSource: https://github.com/slackhq/SlackTextViewController

;)

zdavatz commented 6 years ago

Keyboard jumping around when you do "Apple + K", seems to be related to Keyboard not knowing in which mode (LS or PT) the device is. See: https://ywesee.slack.com/files/U27FC8WLA/F9YTM82SE/view_is_still_dancing_around_while_typing..mov

zdavatz commented 6 years ago
  1. [x] At the moment the layout is not recalculated in the app when changing orientation, unless it's done by the system.
  2. [x] if you type comments in the prescription view, then the view dances.
zdavatz commented 6 years ago

No more dancing but still some hiding going on.

Please always test with more then one product and with more then two lines in the comment section.

bildschirmfoto 2018-04-03 um 09 24 23
zdavatz commented 6 years ago

getting better. LS mode is still somehow out of bounds when editing the comment of the package.

bildschirmfoto 2018-04-03 um 13 38 17
zdavatz commented 6 years ago

Enter does not reload view.

bildschirmfoto 2018-04-03 um 13 55 43
zdavatz commented 6 years ago

Overlapping Text after rotating from Portrait to Landscape mode.

bildschirmfoto 2018-04-03 um 14 03 45
zdavatz commented 6 years ago

Interesting: https://github.com/slackhq/SlackTextViewController/blob/master/Source/SLKTextViewController.h#L107

zdavatz commented 6 years ago

I am closing this, lets save the remaining (doing more new lines makes the jumping worse) jumping for later.