bitnpc

Results 5 comments of bitnpc

+1,遇到了相同的问题,害惨我了。。他这个插入消息的方法写的有很大问题。滥用GCD啊! 千万不要用他的addMessage方法,自己写一个: 要在主线程执行 ``` XHMessage *xhMessage = [self getXHMessageByMsg:message]; [self.messages addObject:xhMessage]; NSIndexPath *indexPath = [NSIndexPath indexPathForRow:self.messages.count -1 inSection:0]; [self.messageTableView insertRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationNone]; [self scrollToBottomAnimated:YES]; ```

Bug太多了。。坑死我了

仿照[第 139 题](https://github.com/grandyang/leetcode/issues/139)的思路也可以。 `class Solution { public: vector wordBreak(string s, vector& wordDict) { unordered_set wordSet(wordDict.begin(), wordDict.end()); vector combine; vector res; dfs(s, wordSet, 0, combine, res); return res; } void dfs(string...

CFTypeRef fontRef = CTFontCreateWithName((__bridge CFStringRef)self.refreshingTextFont.fontName, self.refreshingTextFont.pointSize, NULL); [text setFont:fontRef]; CFRelease(fontRef);