• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






PJXWang

 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理

2016年8月29日

剪切板实现拖拽代码
摘要: // // PJXDragAndDropView.m // PJXPasteboard // // Created by 王俏 on 16/8/29. // Copyright © 2016年 wangqiao. All rights reserved. // #import "PJXDragAnd 阅读全文
posted @ 2016-08-29 23:07 PJXWang 阅读(1091) 评论(0) 推荐(0)
 
绘制渐变背景代码
摘要: - (void)drawRect:(NSRect)dirtyRect { [super drawRect:dirtyRect]; NSGradient *backgroundGradient = [[NSGradient alloc] initWithStartingColor:[NSColor c 阅读全文
posted @ 2016-08-29 10:13 PJXWang 阅读(234) 评论(0) 推荐(0)
 
NSTimer操作
摘要: NSTimer *tm = [NSTimer timerWithTimeInterval:0.5f target:self selector:@selector(verifyConverting:) userInfo:nil repeats:YES]; [[NSRunLoop mainRunLoop 阅读全文
posted @ 2016-08-29 09:22 PJXWang 阅读(136) 评论(0) 推荐(0)
 
AlertPanel的显示加载代码
摘要: NSInteger t=NSRunAlertPanel(@"Note:", @"The PDF(s) requiring user password will be skipped. Do you want to continue?", @"No", @"Yes", NULL); if (t==1) 阅读全文
posted @ 2016-08-29 09:21 PJXWang 阅读(163) 评论(0) 推荐(0)
 
NSWindowController的初始化创建代码
摘要: -(PRAboutWindowController*)aboutCtrl{ if(_aboutCtrl == nil){ _aboutCtrl = [[PRAboutWindowController alloc]initWithWindowNibName:@"PRAboutWindowControl 阅读全文
posted @ 2016-08-29 09:17 PJXWang 阅读(646) 评论(0) 推荐(0)
 
NSViewController的初始化创建代码
摘要: -(PRParseringViewCtrl *)parseringViewCtrl { if (!_parseringViewCtrl) { _parseringViewCtrl =[[PRParseringViewCtrl alloc]initWithNibName:NSStringFromCla 阅读全文
posted @ 2016-08-29 09:16 PJXWang 阅读(721) 评论(0) 推荐(0)
 
button添加链接的title显示效果代码
摘要: -(void)setLinks { NSString *text = @"Privacy Policy."; NSMutableAttributedString * attributedText = [[NSMutableAttributedString alloc] initWithString: 阅读全文
posted @ 2016-08-29 09:13 PJXWang 阅读(339) 评论(0) 推荐(0)
 
添加属性字符串的代码
摘要: + (NSAttributedString*)attributeString:(NSString*)string color:(NSColor*)color font:(NSFont*)font alignment:(NSTextAlignment)alignment { NSColor *txtC 阅读全文
posted @ 2016-08-29 09:11 PJXWang 阅读(261) 评论(0) 推荐(0)
 
打开openPanel的代码
摘要: - (IBAction)openPDFFile:(id)sender { NSOpenPanel *panel = [NSOpenPanel openPanel]; [panel setAllowsMultipleSelection:YES]; NSArray* fileArray = [NSArr 阅读全文
posted @ 2016-08-29 09:00 PJXWang 阅读(524) 评论(0) 推荐(0)
 
移除所有userDefault信息代码
摘要: - (void)clearAllUserDefaultsData { NSString *appDomain = [[NSBundle mainBundle] bundleIdentifier]; [[NSUserDefaults standardUserDefaults] removePersis 阅读全文
posted @ 2016-08-29 08:59 PJXWang 阅读(254) 评论(0) 推荐(0)
 
打开URL链接代码
摘要: 1.打开URL #define PDF_PRODUCT_URL @"http://www.cisdem.com/pdf-password-remover-mac.html" [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:PDF 阅读全文
posted @ 2016-08-29 08:58 PJXWang 阅读(437) 评论(0) 推荐(0)
 
获取info.plist的信息的代码
摘要: NSString *CurPath = [[NSBundle mainBundle] bundlePath]; NSString *xmlPath = [CurPath stringByAppendingPathComponent:@"/Contents/Info.plist"]; NSMutabl 阅读全文
posted @ 2016-08-29 08:55 PJXWang 阅读(211) 评论(0) 推荐(0)