iOS7ã§LINEã§ç»åå ±æããæ¹æ³
LINEã§ç»åå
±æããã®ã¯ããªããiOS7ã§ã¯é対å¿ã«ãªã£ã¦ããã
ããã¥ã¡ã³ãã¯ãã¡ããæè¡ä»æ§>æ¸å¼2
http://media.line.me/howto/ja/
ãã§ãã©ãã«ãiOS7ã§ç»åå
±æããããã¨æã£ã¦ãããéããæ¹æ³ãè¦ã¤ããã
iOS7ã§ãç»åãLINEã§éããããã«ããæ¹æ³
http://www.appstars.jp/archive/75
ãããã®æ¹æ³ã§ããã¾ããããããã
åè¦å
«è¦ãã¦ãããã@koogawa ããããæãã¦ãããã
ãªãã¨JPEGã¯ãã¡ã§ãPNGãªããããã¨ãããã¨ã ã£ãã
ã³ã¼ããããã«æ®ãã¦ããã
- (void)shareImageViaLine:(UIImage *)image { UIPasteboard *pasteboard = [UIPasteboard generalPasteboard]; //[pasteboard setData:UIImageJPEGRepresentation(image, 1.0) forPasteboardType:@"public.jpeg"]; //âJPEGã§ã¯ã§ããªã模æ§ãPNGãªãOKã [pasteboard setData:UIImagePNGRepresentation(image) forPasteboardType:@"public.png"]; //PNGã§ï¼ï¼ï¼ NSString *urlString = [NSString stringWithFormat:@"line://msg/image/%@",pasteboard.name]; NSURL *url = [NSURL URLWithString:urlString]; [[UIApplication sharedApplication] openURL:url]; }
gist
https://gist.github.com/osmszk/9718995
â»æ³¨æäºé ï¼ãã®æ¹æ³ã¯éå ¬å¼ãªã®ã§ããã¤éããªãããã«ãªãããããã¾ããã
Macç°å¢ã§æå®ã®ä½ç½®ããç»åã®åãåãããããã£ãã®ã§ãImageMagickããã¦ã³ãã¼ããã
Macç°å¢ã§æå®ã®ä½ç½®ããç»åã®åãåãããããã£ãã®ã§ãImageMagickããã¦ã³ãã¼ãããã
ãã®ãã°ãæ®ãã¦ããã
###
ImageMagickã¯ãç»åç·¨éãã¼ã«ãã³ãã³ãã©ã¤ã³ã§æå®ã®ä½ç½®ããç»åã®åãåãï¼ããªãã³ã°ï¼ãã§ãããããã
ã¨ãããã¨ãªã®ã§ããã¦ã³ãã¼ããã¦ã¿ãã
ç°å¢ã¯ãMac OS10.8.5
X11.appï¼XQuartzï¼ã¯ãã§ã«ã¤ã³ã¹ãã¼ã«æ¸ã¿ãï¼å¾ã»ã©ã¤ã³ã¹ãã¼ã«ããã¦ããªãã£ããã¨ãå¤æï½ï¼
Cactuslab · ImageMagick installer for Mac OS X
ã®ãImageMagick 6.8.7-2 for Mac OS X 10.5 – 10.9Requires XQuartz. (7.7 MB)ã
ããã¦ã³ãã¼ãããã¤ã³ã¹ãã¼ã«ã
ãã§ãã¿ã¼ããã«ãã²ããã
$ which convert
/opt/ImageMagick/bin/convert
ããããã
/opt/ã«ã¤ã³ã¹ãã¼ã«ãããã
ãã£ãããããã«ãåãåãããããã¦ã¿ãã
$ convert -crop 140x469+95+14 test.png new.png
ãããã
dyld: Library not loaded: /opt/X11/lib/libfreetype.6.dylib
Referenced from: /opt/ImageMagick/bin/convert
Reason: image not found
Trace/BPT trap: 5
ã¨æãããå®è¡ã§ããã
/opt以ä¸ã«/X11 ãããåæãªã®ããããã¨ãããã¨ã§ãã·ã³ããªãã¯ãªã³ã¯ãè²¼ãã
$ sudo ln -s /usr/X11 /opt/X11
ãã§ãå度ããã£ã¬ã³ã¸ã
$ convert -crop 140x469+95+14 test.png new.png
ãããã
dyld: Library not loaded: /opt/X11/lib/libfontconfig.1.dylib
Referenced from: /opt/ImageMagick/bin/convert
Reason: Incompatible library version: convert requires version 8.0.0 or later, but libfontconfig.1.dylib provides version 6.0.0
Trace/BPT trap: 5
ã¾ãæãããã
libfontconfig.1.dylibãããã®ã ãã©ããã¼ã¸ã§ã³ãå¤ãã ã¨ã
ã
ï¼ï¼
ãã¼ããSpotlightã§X11.app ãã²ããã¦ã¢ãããã¼ããããã¨ãããã
ãX11 ã¯ããOS Xã«ä»å±ãã¦ã¾ããããã¤ã³ã¹ãã¼ã«ãã¾ããï¼ãã¨ãXQuartzã¤ã³ã¹ãã¼ã«ããã¦ãªãã£ããã ãªããã
MacOS10.7 æ代ã¯çµæ§ã¤ãã£ã¦ããã§ãã¦ã£ããã¤ã³ã¹ãã¼ã«ããã¦ããã¨æã£ã¦ããã
ã¨ããããã§ã
XQuartz
ããã¤ã³ã¹ãã¼ã«ãXQuartzã®ãã¼ã¸ã§ã³ã¯2.7.5 ã ã£ãã
ãã§ã
$ cd /opt/
$ ls -la
total 0
drwxr-xr-x@ 5 root admin 170 12 2 03:09 .
drwxr-xr-x 34 root wheel 1224 12 1 15:45 ..
drwxr-xr-x 7 root wheel 238 10 24 08:14 ImageMagick
drwxr-xr-x 8 root wheel 272 11 4 01:53 X11
drwxr-xr-x 11 root admin 374 10 22 2011 local
ãã¾ããããX11 ãã/optä¸ã«ã
ã¦ãã¨ã§ãåã ãã£ã¬ã³ã¸
$cd ~/Desktop
$ convert -crop 140x469+95+14 test.png new.png
ã§ãã§ããã
test.png ç»åãã(x,y) = (95,14)ã®ä½ç½®ãããå¹
140px é«ã469px åãåºããnew.png ã¨ããã
ã»ã£ã
åèï¼
ImageMagick を OSX Mountain Lion にインストールする - Qiita
ImageMagickの「crop」 一言多いプログラマーの独り言
CSVããPLISTã«å¤æããæ¹æ³
以åãPLISTからCSVに変換する方法ã¨ããè¨äºãæ¸ããã
ãã®è¨äºå
ã§ã
CSVããPLISTã«å¤æããã«ã¯ãã¤ã¤ã¿ããã®è¨äº(http://d.hatena.ne.jp/shu223/20110511/1305129443)ã®æ¹æ³ããCSV2Plistã¨ããMacã¢ããª(http://sheepapp.com/app/CSV2Plist/)ã§è§£æ±ºã§ããã
ã¨æ¸ãããããªãã ããã ãCSVããPLISTã«å¤æããæ¹æ³ãèªåã§Obj-cã§æ¸ããããªã£ãã
ã¨ãããã¨ã§ããã£ããã³ã¼ããã
åææ¡ä»¶ã¨ãã¦ã¯ã
(1)å¤æåã®CSVã®å½¢å¼ã¯ãä¸è¨ã®ãããªãã®ã
no,name,hp,mp
0,suzuki,32,23
1,osamu,27,34
2,desu,21,45
ï¼æåã³ã¼ãã¯ãèªåã®ç°å¢ã§ããã©ã«ãã§Shift_Jisã ã£ããMac Excelã§csvä¿åããã¨ãããã©ã«ãShift_Jisã«ãªãã¯ãï¼
(2)ã¢ããªã®Documents/ãã£ã¬ã¯ããªä»¥ä¸ã«å¤æãããCSVãããã¨ãã¦ãåããã£ã¬ã¯ããªã«PLISTãåãåºãã
NSError *error; NSString *filePath = [[NSHomeDirectory() stringByAppendingPathComponent:@"Documents"]stringByAppendingPathComponent:@"prologue.csv"]; NSString *text = [NSString stringWithContentsOfFile:filePath encoding:NSShiftJISStringEncoding error:&error];//NSUTF8StringEncoding if (error) { NSLog(@"error:%@",error); } NSMutableArray *outputArray = [NSMutableArray array]; NSArray *lines = [text componentsSeparatedByString:@"\r"];// @"\n" NSString *keysStr = [lines objectAtIndex:0]; NSArray *keys = [keysStr componentsSeparatedByString:@","]; for (NSInteger i = 1;i<[lines count];i++ ) { NSString *itemsStr = [lines objectAtIndex:i]; NSArray *items = [itemsStr componentsSeparatedByString:@","]; NSMutableDictionary *content = [NSMutableDictionary dictionary]; for (NSInteger k=0; k<[items count]; k++) { NSString *item = [items objectAtIndex:k]; NSString *key = [keys objectAtIndex:k]; [content setObject:item forKey:key]; } [outputArray addObject:content]; } NSString *fileName = @"hogehoge.plist"; BOOL result = [outputArray writeToFile:[[NSHomeDirectory() stringByAppendingPathComponent:@"Documents"] stringByAppendingPathComponent:fileName] atomically:YES]; NSString *msg; if (!result) { msg = @"ãã¡ã¤ã«ã®æ¸ãè¾¼ã¿ã¨ã©ã¼"; }else{ msg = @"ãã¡ã¤ã«ã®æ¸ãè¾¼ã¿æå"; } UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"" message:msg delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil]; [alert show];
æ¤ç´¢ããããã
CSVをPlistに変換する - Qiita
ã¨ããè¨äºãã¿ã¤ãããã©ãæã£ãéãã®åããããªãã£ãã®ã§ãã¡ããã¨ã¢ã¬ã³ã¸ããæãã
ãAppãã¤ã³ã¹ãã¼ã«ã§ãã¾ããã§ãããããSpringBoardã¯Appãèµ·åã§ãã¾ããã§ãããã¨ã©ã¼:0ãã¨ããçç±ã§ã·ãã¥ã¬ã¼ã¿ã§ã¢ããªèµ·åã§ããªã件
ã¾ãã¾ãiOS7(or Xcode5)ã®è©±é¡ã
Xcode5ã«ãã¦ããããã¶ãéçºã¹ãã¼ããè½ã¡ãæ°ããããã¨ããã®ããã·ãã¥ã¬ã¼ã¿ã§ã¢ããªãèµ·åã§ããªãã¨ããå¤ã ããããAppãã¤ã³ã¹ãã¼ã«ã§ãã¾ããã§ãããããSpringBoardã¯Appãèµ·åã§ãã¾ããã§ãããã¨ã©ã¼:0ãã¨ããçç±ã§èµ·åã§ããªãã®ã ã
解決æ¹æ³ã¨ãã¦ã¯ã
ã»ã¢ããªã®ãã¤ããªãåé¤ï¼ãã¹ã¯ã/Users/xxx/Library/Application Support/iPhone Simulator/6.1/Applications/hogehogeï¼
ã»ã¯ãªã¼ã³
ã»ã·ãã¥ã¬ã¼ã¿åèµ·å
ã§èµ·åã§ããããã«ãªãã
ãªãã ããªã¼ã
åèï¼
iPhone Simulator: SpringBoard failed to launch application with error: 7 - Stack Overflow
Xcode 5 - "iOS Simulator failed to install application" every time I switch simulators - Stack Overflow
Legacy Language Designator - The directories located at ...ã®è¦å解æ¶æ¹æ³
iOS7 ãXcode5ã«ãã¼ã¸ã§ã³ã¢ããããã
ã¨ããã§ãæä½ã®KAKUREiconãã¢ãããã¼ããããã«ãããããLegacy Language Designator - The directories located at ..ãã®è¦åãç³è«æï¼Validateããã¨ãï¼ã«è¡¨ç¤ºããããè¦åãªã®ã§ããã®ã¾ã¾Validateã§ããã®ã ããæ°ã«ãªã£ãã®ã§ã©ãã«ã解æ¶ãããã¨æã£ãã
ä½ãåé¡ãã¨ããã¨ããã¼ã«ã©ã¤ãºãã¡ã¤ã«ã®ãã£ã¬ã¯ããªåãå¤ãã£ã¦ãã¨ã ãæä½ã¯ãã¡ããæ¥æ¬èªã¨è±èªã«å¯¾å¿ãã¦ããã ãããããã®InfoPlist.stringsãLocalizable.stringsãããã©ã«ãJapanese.Ipojã¨English.Ipojã«ä¿åãã¦ããããã®ãã©ã«ãåãå¤ãã®ãåé¡ã ã£ãããããããja.Ipojã¨en.Ipojã«ãªãã¼ã ããã解æ¶ããã
ã¨ãç°¡æ½ã«æ¸ãããããªãã¼ã ããã®ã«åè¦å «è¦ãããFinderä¸ã§ãªãã¼ã ãã¦ããã®ãã¨Xcodeããåã ã®ãã¡ã¤ã«ãã²ãã¥ããã°ãããã ãã¼ã¨å®æãªèãã ã£ããã失æãããXcodeä¸ã§ã²ãã¥ããããªãã£ãã
ãªã®ã§ãæ¹æ³ã¨ãã¦ã¯ãæåããããã¼ã«ã©ã¤ãºã®ãã¡ã¤ã«ãã¹ã¦åé¤ãã¤ãã¼ã«ã©ã¤ãºè¨å®ã解æ¶ããããã®ãã¨è±èªverã®ãã¡ã¤ã«âã®ã¿âãã¾ããFinderä¸ã§ãã³ããããXcodeä¸ç´ä»ããããã¼ã«ã©ã¤ãºã®è¨å®ãã...ã¨ãããæè¬ãã¼ããããããã®ããã¹ãã
ãã®ãããXcodeå¼±ãããªããããã
ãªãªã¸ãã«ã®å£ç´ã¤ããã¾ãããããã楽ããå£ç´ããã²ã
KAKUREicon - ãªãªã¸ãã«ã®å£ç´ä½æ(ã¢ã¤ã³ã³ã®è£ãããæ°ã«å
¥ãã®ç»åããã©è¦ã)
https://itunes.apple.com/jp/app/id404832410?mt=8#
PLISTããCSVã«å¤æããæ¹æ³
CSVããPLISTã«å¤æããã«ã¯ãつつみさんの記事ã®æ¹æ³ããCSV2Plistã¨ããMacã¢ããªã§è§£æ±ºã§ããã
ãã ãPLISTããCSVã«å¤æããæ¹æ³ãæ¢ãã¦ãè¦ã¤ãããªãã£ãã®ã§ãGitHub - davedelong/CHCSVParser: A proper CSV parser for Objective-C
ã使ã£ã¦Obj-cã§æ¸ãã¦ã¿ãã
ãªã½ã¼ã¹ã«å¤æãããPLISTã¶ã£ããã§ããµã³ãããã¯ã¹ã®Documentsã«CSVãçæããã
åæã¨ãã¦ã¯ãCSV2Plistã§çæãããPLISTãCSVã«æ»ããããªæãã§ã
ï¼â»ãã¡ããé層ãè¤éãªPLISTã¯CSVã«å¤æã§ããããããªãï¼
#import "CHCSVParser.h" - (void)convertToCsvFromPlist:(NSString *)fileName{ NSString *plistPath = [[NSBundle mainBundle] pathForResource:fileName ofType:@"plist"]; NSArray *plistArray = nil; if ([[NSFileManager defaultManager]fileExistsAtPath:plistPath]) { plistArray = [NSArray arrayWithContentsOfFile:plistPath]; } if (plistArray == nil) { return; } NSString *outputFileName = [NSString stringWithFormat:@"%@.csv",fileName]; NSString *outputFilePath = [[NSHomeDirectory() stringByAppendingPathComponent:@"Documents" ] stringByAppendingPathComponent:outputFileName]; NSOutputStream *stream = [NSOutputStream outputStreamToFileAtPath:outputFilePath append:NO]; CHCSVWriter *csvWriter = [[CHCSVWriter alloc] initWithOutputStream:stream encoding:NSShiftJISStringEncoding delimiter:',']; for (NSInteger i = 0; i < [plistArray count]; i++) { NSDictionary *dic = (NSDictionary*)[plistArray objectAtIndex:i]; if (i==0) { for (id key in [dic keyEnumerator]) { [csvWriter writeField:key]; } [csvWriter finishLine]; } for (id key in [dic keyEnumerator]) { [csvWriter writeField:[dic valueForKey:key]]; } [csvWriter finishLine]; } }
encodingãNSUTF8StringEncodingã«ããã¨ãçæãããCSVãã²ãããã¨ãã«æååãããã®ã§ãNSShiftJISStringEncodingã«ãã¦ããã
ã«ã©ã ã®é åºãPLISTã®ã¨ãã¨ããã£ã¦ãã¾ãã®ã§ãé åºããããããªãå ´åã¯ãä¸è¨ã®ããã«ããå¿
è¦ããããããªãã¡ãã£ã¨å¼·å¼ã ããã©ããä»ã«ããæ¹æ³ããããã
ï¼ãã ããã«ã©ã åãããã£ã¦ããå ´åã®ã¿ï¼
- (void)convertToCsvFromPlist:(NSString *)fileName{ //----ç¥---- for (NSInteger i = 0; i < [plistArray count]; i++) { NSDictionary *dic = (NSDictionary*)[plistArray objectAtIndex:i]; NSArray *array = [self sortDic:dic]; if (i==0) { for (NSString *str in array) { NSString *key = [[str componentsSeparatedByString:@"<>"] objectAtIndex:1]; [csvWriter writeField:key]; } [csvWriter finishLine]; } for (NSString *str in array) { NSString *value = [[str componentsSeparatedByString:@"<>"] objectAtIndex:0]; [csvWriter writeField:value]; } [csvWriter finishLine]; } } - (NSArray *)sortDic:(NSDictionary *)dic { NSMutableArray *array = [[NSMutableArray alloc]init]; [array addObject:[NSString stringWithFormat:@"%@<>%@",[dic objectForKey:@"columnA"],@"columnA"]]; [array addObject:[NSString stringWithFormat:@"%@<>%@",[dic objectForKey:@"columnB"],@"columnB"]]; [array addObject:[NSString stringWithFormat:@"%@<>%@",[dic objectForKey:@"columnC"],@"columnC"]]; [array addObject:[NSString stringWithFormat:@"%@<>%@",[dic objectForKey:@"columnD"],@"columnD"]]; return array; }
3Dããªã³ã¿ã§iPhoneã±ã¼ã¹ãã¤ãã£ã¦ã¿ã
ä¾ã®Replicator2ã§ãiPhoneã±ã¼ã¹ãå°å·ãã¦ã¿ãã
1åç®
3DプリンタでiPhoneケースをつくってみた - NAVER まとめ
2,3åç®
3DプリンタでiPhoneケースをつくってみた(2,3回目) - NAVER まとめ
åæ°ãããªããã³ã«ã¯ãªãªãã£ãåä¸ãã¦ããã®ãå¬ããã
ãã ã3åå°å·ããçµææã£ãã®ãã2,3ããªã®ç©å±¤ã¯Replicator2ã§ã¯å³ããã®ã§ã¯ãªãããã¨ãããã¨ãå½¢ç¶ã«ããã ããããã©ãã3åã¨ããiPhoneã±ã¼ã¹ã®å¼ã£æããã®é¨åããç©å±¤ã«å¤±æããå´©ãã¦ãã¾ã£ã¦ããããå½¢ç¶ã«ãããã¨æ¸ããã®ã¯ãiPhoneã±ã¼ã¹ã®ç¸ã¯ãæ¯ãã¨ãªãå´é¢ããæ°ããªåä½ã®è¡¨é¢ç©ã§ããæ¯ãããã¦ããªãã®ã«å ãã横ã«é£ã³åºãã¦ããå½¢ã ã¨ãããã¨ã ãããããããå°å·ããåããå¤ããããï¼ã¤ã¾ãããªãã¸ã§ã¯ããèªã¿ãã¾ããéã«ãã±ã¼ã¹èé¢ãZ軸ã«å¯¾ãã¦åç´ã«ããã®ã§ã¯ãªããX軸ã¾ãã¯Y軸ã«å¯¾ãã¦åç´ã«ããã¨ãããã¨ãï¼ãããããããã®ãã¨æãããã ãããã®å ´åã¯ãç¸ä»¥å¤ã®é¨åãã横ã«é£ã³åºãå½¢ã«ãªãã®ã§ãæ©ã¾ããã
iPhoneã±ã¼ã¹ã¯ããã®ã«ããã¨ããã¯ã¾ãæããå¿ é ã§ããã®ã§ããã®æ©è½ãä¹ãé¤ãã®ã¯èããããªããã«ãã¼ã¨ããæ©è½ããã¤ã®ã§ãå¤ãããæå³ããªãã
ãã®æ©è½ãããã¡ã¤ã¤ãä¸è¨ã®ãããªåé¡ã解決ãã¦ããããã¨æãã次ã¯ãç©å±¤ã2,3ããªã§ã¯ãªããããã«ååããã¦ãå°å·ãã¦ã¿ããã