記錄遇到的ios下的bugs

來源:互聯網
上載者:User

記錄遇到的ios下的bugs

開個文章不定期更新,記錄遇到的ios下的bugs,其中有些已經解了,有些還是無解,有些是apple自己的改進,但是確實坑到我們了

UIWebView記憶體流失

這個到ios7下還無解,ios8未看
UIFont copy 在ios6下crash

這個想不明白為啥,也許是以前的coder用了什麼黑魔法

UITextView 和 UITextField 的鍵盤出現的訊息的順序不一樣的問題
// UIKeyboardDidShowNotification ---> UITextViewTextDidBeginEditingNotification// UITextFieldTextDidBeginEditingNotification ---> UIKeyboardDidShowNotification

這個也不能算是bug,但是有的時候就是想先執行DidBeginEditing的訊息得到引起彈出鍵盤的sender囧麼辦呢
下面的代碼ios7下面(sdk7.1)superview都是UIDropShadowView,ios8下面(sdk8.0)2是nil

 [self presentViewController:vc                       animated:NO                     completion:^{                         UIView *view = vc.view.superview;                         NSLog(@"1:%@", view);                     }];    UIView *view = vc.view.superview;    NSLog(@"2:%@", view);

一般用這個屬性是修改呈現的view的size, 在sdk7以後可以用preferredContentSize
ios7在轉屏的時候window是不會轉動的,ios8轉動

這就導致一些依賴UIWindows的控制項就悲劇了

window.location

在 ios8 中網頁裡用window.location= “xxx://yyy”可以調起註冊了xxx的app,但是在ios8下面,結尾帶’=’的url是不能調起app的.
解決方案

var iThunderFrame;    iThunderFrame = document.createElement("iframe");    iThunderFrame.setAttribute("src", sDownloadURL);    iThunderFrame.setAttribute("style", "display:none;");    iThunderFrame.setAttribute("height", "0px");    iThunderFrame.setAttribute("width", "0px");    iThunderFrame.setAttribute("frameborder", "0");    document.body.appendChild(iThunderFrame);    iThunderFrame.parentNode.removeChild(iThunderFrame);

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.