Upgrade to Pro — share decks privately, control downloads, hide ads and more …

iOS 7 compatibility issues (UITextView)

iOS 7 compatibility issues (UITextView)

iOS 7 UITextView has many critical bugs. Introduce workaround or alternative libraries.

9bf923e39671cde83584e3e926296c13?s=128

Kishikawa Katsumi

November 13, 2013
Tweet

More Decks by Kishikawa Katsumi

Other Decks in Technology

Transcript

  1. J04DPNQBUJCJMJUZJTTVFT 6*5FYU7JFX BOETPPO IUUQTHJUIVCDPNLJTIJLBXBLBUTVNJ5FYU7JFX$PNQBUJCJMJUZ

  2. ؛઒ࠀݾ http://kishikawakatsumi.com Twitter @k_katsumi 24/7 twenty-four seven http://d.hatena.ne.jp/KishikawaKatsumi/

  3. J04SFMFBTFECVUTPNFDSJUJDBM CVHTTUJMMSFNBJOFE w #SPLFO6*5FYU7JFX w #SPLFO6*4FBSDI#BS w #SPLFO6*1PQPWFS$POUSPMMFS TJODFBMPOHUJNFBHP 

    w (VJEFE"DDFTT w "JS1SJOU ʜBOETPPO
  4. 6*5FYU7JFX

  5. /PUTDSPMMJOHUPDBSFUQPTJUJPOXIFOGPDVTFE 5IFDBSFUJTNBZCFIFSF

  6. /PUTDSPMMJOHXIFOJOTFSUOFXMJOF

  7. 0DDVSTPO"QQMF`T"QQBOE'SBNFXPSLT

  8. 8PSLBSPVOE

  9. - (void)scrollRangeToVisible:(NSRange)range { [super scrollRangeToVisible:range]; if (floor(NSFoundationVersionNumber) > NSFoundationVersionNumber_iOS_6_1) {

    if (self.layoutManager.extraLineFragmentTextContainer != nil && self.selectedRange.location == range.location) { CGRect caretRect = [self caretRectForPosition:self.selectedTextRange.end]; [self scrollRectToVisible:caretRect animated:NO]; } } } 4VCDMBTTJOHQBUDI
  10. 1BUDIJOEFMFHBUFNFUIPE - (void)textViewDidChange:(UITextView *)textView { NSString *text = textView.text; NSRange

    selectedRange = textView.selectedRange; textView.scrollEnabled = NO; textView.text = nil; textView.text = text; selectedRange.length = 0; textView.selectedRange = selectedRange; textView.scrollEnabled = YES; }
  11. 3FBEEFWGPSVNCFGPSFVTJOH

  12. 3FBECFGPSFVTJOH w IUUQTEFWGPSVNTBQQMFDPNNFTTBHF w IUUQJOFTTFOUJBMDPNCVHT

  13. 0UIFS4PMVUJPOT w +545FYU7JFXIUUQTHJUIVCDPNKBSFETJODMBJS+545FYU7JFX w *$5FYU7JFXIUUQTHJUIVCDPN&YJMF*$5FYU7JFX w 4&$PSF5FYU7JFXIUUQTHJUIVCDPNLJTIJLBXBLBUTVNJ4&$PSF5FYU7JFX w IUUQTHJTUHJUIVCDPNBHJMFUPSUPJTFBDDCGEBBGCBCD w

    IUUQTEFWGPSVNTBQQMFDPNNFTTBHF
  14. +545FYU7JFX

  15. .ZTBNQMFXPSLBSPVOE IUUQTHJUIVCDPNLJTIJLBXBLBUTVNJ5FYU7JFX$PNQBUJCJMJUZ

  16. -JOLXJUI6*5FYU7JFX

  17. 4IPVMEVTFSEQBSUZMJCSBSJFT w 4&$PSF5FYU7JFXIUUQTHJUIVCDPNLJTIJLBXBLBUTVNJ4&$PSF5FYU7JFX w 8."5XFFU7JFXIUUQTHJUIVCDPNNBSLCFBUPO8."5XFFU7JFX w 555"UUSJCVUFE-BCFMIUUQTHJUIVCDPNNBUUU555"UUSJCVUFE-BCFM w 6;5FYU7JFXIUUQTHJUIVCDPNTPOTPOHJUIVC6;5FYU7JFX

  18. 4&$PSF5FYU7JFX

  19. 8."5XFFU7JFX

  20. 6;5FYU7JFX