This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define kClassKey @"rootVCClassString" | |
#define kTitleKey @"title" | |
#define kImgKey @"imageName" | |
#define kSelImgKey @"selectedImageName" | |
- (void)viewDidLoad { | |
[super viewDidLoad]; | |
self.edgesForExtendedLayout = UIRectEdgeNone; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <UIKit/UIKit.h> | |
/** | |
viewDidAppear打印当前页面类名,dealloc时打印销毁画页,看是否有离开未销毁可能存在内存泄漏的页面 | |
*/ | |
@interface UIViewController (Hook) | |
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSMutableAttributedString * attributedString1 = [[NSMutableAttributedString alloc] initWithString:self.illLabel.text]; | |
NSMutableParagraphStyle * paragraphStyle1 = [[NSMutableParagraphStyle alloc] init]; | |
[paragraphStyle1 setLineSpacing:50.0]; | |
[attributedString1 addAttribute:NSParagraphStyleAttributeName value:paragraphStyle1 range:NSMakeRange(0, [self.illLabel.text length])]; | |
[self.illLabel setAttributedText:attributedString1]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
@interface RSAEncryptor : NSObject | |
/** | |
* 加密方法 | |
* | |
* @param str 需要加密的字符串 | |
* @param path '.der'格式的公钥文件路径 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "RSAEncryptor.h" | |
#import <Security/Security.h> | |
@implementation RSAEncryptor | |
static NSString *base64_encode_data(NSData *data){ | |
data = [data base64EncodedDataWithOptions:0]; | |
NSString *ret = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; | |
return ret; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[BaseService postJSONWithUrl:APP_URL parameters:nil success:^(id responseObject) | |
{ | |
NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableContainers error:nil removingNulls:YES ignoreArrays:NO]; | |
NSArray *infoArray = [dic objectForKey:@"results"]; | |
if ([infoArray count]) | |
{ | |
NSDictionary *releaseInfo = [infoArray objectAtIndex:0]; | |
NSDictionary *infoDic = [[NSBundle mainBundle] infoDictionary]; | |
NSString *currentVersion = [[infoDic objectForKey:@"CFBundleShortVersionString"] stringByReplacingOccurrencesOfString:@"." withString:@""]; | |
NSString *lastVersion = [[releaseInfo objectForKey:@"version"] stringByReplacingOccurrencesOfString:@"." withString:@""]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@interface AdViewController () | |
/** 定时器 */ | |
@property (nonatomic, strong) NSTimer *timer; | |
@property (nonatomic, strong) UIButton *adButton; | |
@end | |
@implementation AdViewController | |
NSUInteger secondsCountDown = 3;//倒计时秒数 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "System Events" | |
get name of every process whose name is "企业微信" | |
if result is not {} then | |
tell application "企业微信" | |
quit | |
end tell | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "System Events" | |
tell application "企业微信" | |
activate | |
end tell | |
if not (exists (button "登录" of window 1 of application process "企业微信" of application "System Events")) then | |
tell application "企业微信" | |
quit | |
end tell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "System Events" | |
tell application "企业微信" | |
activate | |
tell application "System Events" | |
tell process "企业微信" | |
get entire contents of window 1 | |
end tell | |
end tell | |
end tell | |
OlderNewer