iOS——開發周報(2015-07-31)

來源:互聯網
上載者:User

標籤:xcode   framework   uitapgesturerecogniz   nscharacterset      

1. 鑰匙串中:紅色框中兩者之前一一對應,如果將Keys中private Key或者public Key刪除,那麼其對應的認證將無法使用(由於我不喜歡我的東西太亂,於是刪除了Keys中的一些東西,結果發現認證無法使用了,重新安裝都不好使,只好重新申請了一套認證)


2. Xcode裡面沒有了Frameworks檔案夾,現在可以手動在添加(如,添加目錄不要錯,否則你添加的系統庫不會自動添加到該目錄下)


3. 自己手動建立Framework庫時,預設建立的是動態庫,如果你需要的是靜態庫,那麼需要手動修改“Mach-O Type”為Static Library



5. 判斷字串中是否沒有指定字串以外的字元NSCharacterSet*nameCharacters = [[NSCharacterSet characterSetWithCharactersInString:@"1234567890"]invertedSet];
    NSRange range = [phoneNum rangeOfCharacterFromSet:nameCharacters];
    if (range.location != NSNotFound) {
        return NO;    }

6. 解決 UITapGestureRecognizer 與 UITableView的 didSelectRowAtIndexPath衝突問題(重寫手勢的代理事件)- (BOOL)gestureRecognizer:(UIGestureRecognizer*)gestureRecognizer shouldReceiveTouch:(UITouch*)touch {
    // 若為UITableViewCellContentView(即點擊了tableViewCell),則不截獲Touch事件
    if ([NSStringFromClass([touch.viewclass]) isEqualToString:@"UITableViewCellContentView"]) {
        return NO;
    }
    return  YES;}

7. :     self.view.backgroundColor = [UIColor whiteColor];   UIView *rootView = [UIApplication sharedApplication].keyWindow.rootViewController.view;   UIGraphicsBeginImageContextWithOptions(rootView.bounds.size, YES, 2);   [rootView.layer renderInContext:UIGraphicsGetCurrentContext()];   UIImage *uiImage = UIGraphicsGetImageFromCurrentImageContext();   UIGraphicsEndImageContext();
8. 當你調用presentViewController方法,在視圖之間跳轉時,想要presented Viewcontroller是透明的,可以重寫

- (void)presentViewController:(UIViewController *)viewControllerToPresent animated:(BOOL)flag completion:(void (^)(void))completion {

    if ([[DEVICE systemVersion] floatValue] >=8.0) {

        viewControllerToPresent.modalPresentationStyle =UIModalPresentationOverCurrentContext;

    } else {

        self.modalPresentationStyle =UIModalPresentationCurrentContext;

    }

    [superpresentViewController:viewControllerToPresentanimated:flag completion:completion];

}



著作權聲明:本文為博主原創文章,未經博主允許不得轉載。

iOS——開發周報(2015-07-31)

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.