Mountain Lion OSX 10.8 (새로운 알림 센터)에서 Hello World 알림을 표시하는 예제가 있습니까? iChat과 같은 알림을 표시하는 Mountain Lion OSX 10.8의 Hello World 코드
답변
@Alexsander의 도움을 받아 마침내 대답을 찾았습니다.
NSUserNotification *notification = [[NSUserNotification alloc] init];
[notification setTitle:@"Hello World"];
[notification setInformativeText:@"Hello world message"];
[notification setDeliveryDate:[NSDate dateWithTimeInterval:20 sinceDate:[NSDate date]]];
[notification setSoundName:NSUserNotificationDefaultSoundName];
NSUserNotificationCenter *center = [NSUserNotificationCenter defaultUserNotificationCenter];
[center scheduleNotification:notification];
은 당신이 검색 한 어떤 사람
NSUserNotification 유형을 사용하려면 내 .h에 무엇을 포함/구성해야합니까? –
아무 것도 포함하지 않아도됩니다. Xcode의 최신 버전이 없을 수도 있습니다. – arik
이 NSUserNotification
및 NSUserNotificationCenter
을 찾기 :
이것은 a입니다. 쓸데없는 대답. 해당 페이지에 대한 예나 링크가 없습니다. –
게시물을 쓰는 시점에서 Mountain Lion은 NDA하에 있었기 때문에 많은 것을 할 수 없었습니다. –
- 1. OSX Mountain Lion localhost 문제
- 2. Slim Framework .htaccess/mountain lion osx
- 3. caldecott osx mountain lion 설치시 문제가 발생했습니다.
- 4. Apache :: ASP를 OSX Lion Server에서 실행 - Mountain Lion 용으로 업데이트
- 5. OSX 10.8의 usetex 관련 문제
- 6. Mountain Lion 용 iOS SDK
- 7. Safari의 Mountain Lion 알림 센터
- 8. android "hello world"오류
- 9. OSX Mountain Lion 웹 서버에서 ServerAlias가 해결되지 않습니다.
- 10. Mountain Lion nssharing service
- 11. Mac OS X에서 RMI Hello world 실행 Lion 실패
- 12. lauch4j hello world program
- 13. OSX 10.8 (Mountain Lion)에서 ipfw를 사용할 수 있습니까
- 14. OSX Mountain Lion 자제 의사가 가져 오는 중 오류가 발생했습니다.
- 15. 코코아 hello world screensaver
- 16. wxSmith 코드 :: Hello World 오류를 차단하십시오.
- 17. Sinatra의 실수 'hello world'
- 18. "Hello World"- TDD 방식?
- 19. Hello World Android 튜토리얼
- 20. Mountain Lion 알림 센터에 알림 보내기
- 21. Hello world for circos?
- 22. Android "hello world"- 버전
- 23. Hello World to C#
- 24. Hello World in mod_wsgi
- 25. Hello world for CUDA.Net
- 26. CodeIgniter - Hello World
- 27. AWT bridge의 "Hello World"
- 28. GreaseMonkey Hello World
- 29. hello world for struts
- 30. Hello world app
희망이 도움? 어떤 문서를 읽었습니까? 너 뭐 해봤 니? 그 결과는 무엇입니까? –
나는 당신이 ** 반응하는 것 위에 ** 있어야한다고 생각하지 않습니다. 시작하기 만하면됩니다. 내가 봤 거든 NSNotificationCenter에 대한 예제와 코드 샘플을 뒤죽박죽으로 발견. 어떤 힌트? – MaX
질문에 답변하는 사람의 입장에 자신을 올려 놓으십시오. 당신의 명백한 게으름에 대한 누군가의 논리적 반응은 무례하지 않습니다. 철자가 필요하다면 http://www.catb.org/~esr/faqs/smart-questions.html#before –