ï»??xml version="1.0" encoding="utf-8" standalone="yes"?>在线亚洲一区,丁香一区二区三区,国产精品久久久久久一区二区http://www.aygfsteel.com/sealyu/category/46336.html--- 博客已迁¿U»è‡³: <a >http://blog.sealyu.com</a> zh-cnSat, 15 Jan 2011 20:49:43 GMTSat, 15 Jan 2011 20:49:43 GMT60好消息!iphone版九宫格日记免费了!http://www.aygfsteel.com/sealyu/archive/2011/01/16/343039.htmlsealsealSat, 15 Jan 2011 16:11:00 GMThttp://www.aygfsteel.com/sealyu/archive/2011/01/16/343039.htmlhttp://www.aygfsteel.com/sealyu/comments/343039.htmlhttp://www.aygfsteel.com/sealyu/archive/2011/01/16/343039.html#Feedback0http://www.aygfsteel.com/sealyu/comments/commentRss/343039.htmlhttp://www.aygfsteel.com/sealyu/services/trackbacks/343039.htmliphone版九宫格日记免费了!

下蝲地址åQšhttp://itunes.apple.com/cn/app/id412804027?mt=8&ls=1

iphone版九宫格1.0ç‰ˆæœ¬å‘å¸ƒåŽï¼Œæ”¶åˆ°å¾ˆå¤šéžå¸¸å¥½çš„ç”¨æˆ·å»ø™®®å’Œè¯„仸P¼Œéžå¸¸æ„Ÿè°¢å¤§å®¶çš„æ”¯æŒï¼
所�/span>
Sealyu军_®šž®†ç¨‹åºå…è´¹ï¼Œæ–¹ä¾¿æ›´å¤šç”¨æˆ·çš„ä‹É用!

同时Sealyu 已经˜qžæ—¥èµ¶å‡ºäº?.1版本åQŒè¿‘期即ž®†å‘布,新版本中增加了如下功能:
1.增加密码保护功能�
2.使用InAppSettingsKit重新实现äº?#8220;讄¡½®”™åµé¢ã€?
3.增加"讄¡½®æ—¥è®°æ ‡é¢˜"功能åQŒæ‚¨å¯ä»¥è‡ªå·±è®„¡½®å–œæ¬¢çš„单元格标题ã€?
4.修改了启动画面�






九宫格日è®?.1版本已经提交app store审核åQŒè¿‘期即ž®†å‘布!敬请下蝲试用åQ?br />

seal 2011-01-16 00:11 发表评论
]]>
iphone版九宫格日记˜q›å…¥¾ŸŽå›½App Store新品推荐æ¦?/title><link>http://www.aygfsteel.com/sealyu/archive/2011/01/12/342817.html</link><dc:creator>seal</dc:creator><author>seal</author><pubDate>Wed, 12 Jan 2011 01:54:00 GMT</pubDate><guid>http://www.aygfsteel.com/sealyu/archive/2011/01/12/342817.html</guid><wfw:comment>http://www.aygfsteel.com/sealyu/comments/342817.html</wfw:comment><comments>http://www.aygfsteel.com/sealyu/archive/2011/01/12/342817.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/sealyu/comments/commentRss/342817.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/sealyu/services/trackbacks/342817.html</trackback:ping><description><![CDATA[今天早上½Hç„¶å‘现annie里面加了一个黄色的ž®æ˜Ÿæ˜Ÿï¼š“Featured in App Store”.<br /> 看了一下,原来是进了美国区App Store中Utilities¾cÈš„æ–°å“æŽ¨èæ¦œï¼Œ 非常高兴。最˜q‘要抓紧旉™—´åQŒèµ¶ç´§åŠ æ–°åŠŸèƒ½äº†ã€?br /> <br /> 下面图中的第一个就是了åQ?br /> <img src="http://www.aygfsteel.com/images/blogjava_net/sealyu/diary9-1.jpg" alt="" border="0" /><br /> <br /> <img src="http://www.aygfsteel.com/images/blogjava_net/sealyu/diary9.JPG" alt="" border="0" /><br /> <img src ="http://www.aygfsteel.com/sealyu/aggbug/342817.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/sealyu/" target="_blank">seal</a> 2011-01-12 09:54 <a href="http://www.aygfsteel.com/sealyu/archive/2011/01/12/342817.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>iphone版“胎教吧”终于通过App Store审核äº?/title><link>http://www.aygfsteel.com/sealyu/archive/2010/12/15/340826.html</link><dc:creator>seal</dc:creator><author>seal</author><pubDate>Wed, 15 Dec 2010 12:57:00 GMT</pubDate><guid>http://www.aygfsteel.com/sealyu/archive/2010/12/15/340826.html</guid><wfw:comment>http://www.aygfsteel.com/sealyu/comments/340826.html</wfw:comment><comments>http://www.aygfsteel.com/sealyu/archive/2010/12/15/340826.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/sealyu/comments/commentRss/340826.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/sealyu/services/trackbacks/340826.html</trackback:ping><description><![CDATA[今天iphone版的“胎教å?#8221;¾lˆäºŽé€šè¿‡å®¡æ ¸äº†ï¼Œ˜q™æ˜¯æˆ‘开发的½W¬ä¸€ä¸ªiphone½E‹åºåQŒç¨‹åºåœ°å€åQ?a >http://itunes.apple.com/app/id407952616?mt=8 </a><br /> 通过˜q™ä¸ª½E‹åºçš„开发,对xcode中Coredataå’Œav两个framework有了初步的了解,逐渐熟悉了Objective-Cå’Œxcode的开发风根{€? <img src ="http://www.aygfsteel.com/sealyu/aggbug/340826.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/sealyu/" target="_blank">seal</a> 2010-12-15 20:57 <a href="http://www.aygfsteel.com/sealyu/archive/2010/12/15/340826.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Icon sizes + filenames for iOS deviceshttp://www.aygfsteel.com/sealyu/archive/2010/12/03/339750.htmlsealsealFri, 03 Dec 2010 13:23:00 GMThttp://www.aygfsteel.com/sealyu/archive/2010/12/03/339750.htmlhttp://www.aygfsteel.com/sealyu/comments/339750.htmlhttp://www.aygfsteel.com/sealyu/archive/2010/12/03/339750.html#Feedback0http://www.aygfsteel.com/sealyu/comments/commentRss/339750.htmlhttp://www.aygfsteel.com/sealyu/services/trackbacks/339750.htmlHopefully someone else will find these useful. Distilled from the Apple guide

  • Icon.png – Home screen icon for iPhone 3 (57×57)
  • Icon@2x.png – Home screen icon for iPhone 4 (114×114)
  • Icon-72.png – Home screen icon for iPad (72×72)
  • Icon-Small.png - Settings/Spotlight icon for iPhone 3 (29×29)
  • Icon-Small@2x.png – Settings/Spotlight icon for iPhone 4 (58×58)
  • Icon-Small-50.png – Spotlight icon for iPad (50×50)
  • iTunesArtwork – Icon for iTunes AdHoc distribution (512×512)

Had a request to make the work flow a little easier heres those icons in descending size order

  • iTunesArtwork – Icon for iTunes AdHoc distribution (512×512)
  • Icon@2x.png – Home screen icon for iPhone 4 (114×114)
  • Icon-72.png – Home screen icon for iPad (72×72)
  • Icon-Small@2x.png – Settings/Spotlight icon for iPhone 4 (58×58)
  • Icon.png – Home screen icon for iPhone 3 (57×57)
  • Icon-Small-50.png – Spotlight icon for iPad (50×50)
  • Icon-Small.png - Settings/Spotlight icon for iPhone 3 (29×29)


seal 2010-12-03 21:23 发表评论
]]>
敏捷初哥忏悔å½?è½?http://www.aygfsteel.com/sealyu/archive/2010/11/23/338824.htmlsealsealTue, 23 Nov 2010 08:54:00 GMThttp://www.aygfsteel.com/sealyu/archive/2010/11/23/338824.htmlhttp://www.aygfsteel.com/sealyu/comments/338824.htmlhttp://www.aygfsteel.com/sealyu/archive/2010/11/23/338824.html#Feedback0http://www.aygfsteel.com/sealyu/comments/commentRss/338824.htmlhttp://www.aygfsteel.com/sealyu/services/trackbacks/338824.html在职业生涯的大部分时间里åQŒæˆ‘都是按照瀑布模型的方式进行工作。不久之后,我加入了XebiaåQŒå¼€å§‹ä»¥æ•æ·çš„æ–¹å¼åš‹z…R€‚特别是åQŒæˆ‘们一直把遵åó@ Scrumå’ŒXPæ–ÒŽ³•è®ÞZ¸ŽTDD相结合作为重点强调的实践。从瀑布模型到敏æïLš„转变åQŒå°±åƒä»Žå®‡å®™ä¸­çš„一颗行星突然跨到另一颗一样巨大。一旦完成这¿Uè{变, 你的世界ž®†å‘生翻天覆地的变化åQŒä½ çš„æ€ç»´ã€å·¥ä½œæˆ–协作方式½{‰ç­‰åQŒæ‰€æœ‰ä¸€åˆ‡éƒ½ä¼šæ”¹å˜ã€?/p>

我参加的队伍ç”?名专业äh士组成,å‡ÞZ¹Žæˆ‘意料的是我们中æœ?个之前根本没有ä“Q何采用敏捷完成工作的¾léªŒã€‚è¿™æ øP¼Œæˆ‘们在其ä¸?名有¾léªŒçš„同伴指å¯ég¸‹å¼€ 始工作了。一开始,让ähé«˜å…´çš„äº‹æƒ…åÆˆä¸å¤šåQŒå¤§éƒ¨åˆ†çš„事情都让äh感到沮ä“á。我们认识到åQŒæ•æ·åƈ不只是冲刺(SprintåQ‰å’Œæ²¡æœ‰æ–‡æ¡£ - 有不ž®‘细微之处你得花功夫学才行ã€?/p>

˜q™é‡Œè¯´æ˜Žä¸€ä¸‹æ›¾¾lå‘生过的事情:

开始的éºÈƒ¦

  1. 思维转变

敏捷讲的全是当下的考量、当前的冲刺、当前的用户故事½{‰ã€‚当一路走来突然有其他某个故事出现在面前的时候,我们òq¶ä¸ä¼šäº‹å…ˆè€ƒè™‘事情ž®†å¦‚何发展。过åŽ? 在瀑布模型里,我们常常是首先考虑整个¾pȝ»ŸåQŒHLDåQˆé«˜å±‚设计)和LLDåQˆä½Žå±‚设计)是第一步,在ç‘ô¾l­å‰˜q›ä¹‹å‰ï¼Œå®ƒä»¬å¿…é¡»å†È»“ã€?/p>

相反åQŒæ•æïLš„内容完全是当前状态和不断改变åQŒè¦æ˜¯æˆ‘们的需求未来会变化åQŒæˆ‘们的设计也将随之演变åQ›ä½†æ˜¯æˆ‘们对于超­‘Šå½“前冲刺的事情òq¶ä¸æ˜¯ç‰¹åˆ«å…³æ³¨ã€‚要接受˜q™ä¸€äº‹å®žå¾—花ç‚ÒŽ—¶é—´ã€?/p>

  1. 持箋换档

敏捷是一个不断变化的环境ã€?#8220;响应变化”是其ä¸Õd¯¼åŽŸåˆ™ä¹‹ä¸€ã€‚äØ“äº†å“åº”ï¼Œå¼€å‘è€…å¿…™å»è·Ÿå¸‚面上的技术保持同步,否则它将让你异常痛苦ã€?/p>

我们曑֜¨™å¹ç›®ä¸­ä‹É用了一¿Uæœç´¢å¼•擎库åQŒä½†æˆ‘ä»¬ä¸­åªæœ‰ä¸€äººå¯¹å…¶æœ‰äº†è§£ã€‚ç”±äºŽè¿™ä¸ªç¼ºé™øP¼Œæˆ‘们在估时、结寏V€ç«™ç«‹å¼ä¼šè®®åQŒä»¥åŠå…¶ä»–日常实践里都遇åˆîCº†é—®é¢˜ã€?/p>

我们面对的另一个问题是恰当地进行TDD。从技术观点看åQŒTDD已经有了不少选择。你可以依赖不同的模拟和‹¹‹è¯•框架åQŒè¿™äº›å¾€å¾€éƒ½æ˜¯ä½ åœ¨ç€‘布模型里不使用的东è¥Ñ€‚要是你想采用TDDåQŒé‚£ä¹ˆå°±å¿…须具备对它们的丰富知识åQŒå¦åˆ™æ•´ä¸ªè¿‡½E‹å°±ä¸ä¼šå¤ªé¡ºåˆ©ã€?/p>

¾~“慢地冲åˆ?/h2>
  1. ‹¹‹è¯•驱动开发说的是先写‹¹‹è¯•åQŒç„¶åŽç”±‹¹‹è¯•导出业务逻辑。这是最éšùN€‚应的事情之一åQŒå› ä¸ºå®ƒå®Œå…¨é¢ è¦†äº†ä½ çš„è§‚å¿üc€?

    在瀑布模型里,æ€ÀL˜¯ä»£ç å…ˆå®Œæˆï¼Œç„¶åŽå†è¿›è¡Œäº›‹¹‹è¯•åQˆé€šå¸¸éƒ½æœ‰åQŒä½†òq‰™žæ€ÀL˜¯æœ‰ï¼‰åQ›ä½†TDD则完全是¾U¢ã€ç»¿å’Œé‡æž„。这¿Uæ–¹æ³•要求我们用抽象术语 ˜q›è¡Œæ€è€ƒï¼Œç„¶åŽç”±å®ƒä»¬æ¼”变出具体的事物。由于一开始难以适应åQŒæˆ‘们往往求助于先写出逻辑åQŒç„¶åŽç¡®ä¿å­˜åœ¨è¦†ç›–它们的‹¹‹è¯•。我把这¿UîCؓ开发驱动测试(DDTåQ? æ–ÒŽ³•ã€?/p>

    DDTòq¶æ²¡æœ‰å¢žåŠ å¤ªå¤šçš„æ„ä¹‰ã€‚å‡å¦‚ä½ çŸ¥é“ä½ çš„ä»£ç ž®†ä¼šå¾ˆå¥½åœ°å·¥ä½œï¼Œé‚£äؓ何还要写个测试呢åQŸåªæ˜¯è¦è¯æ˜Ž˜q™æ®µä»£ç ¼‹®å®žæœ‰æ•ˆåQŸåº”该不止这一炏V€‚çš„¼‹®æ˜¯˜q™æ ·ã€‚例如,写测试可以让你的代码在耦合性方面表现更好,而且˜q˜èƒ½å¤ŸäØ“ž®†æ¥çš„代码变更提供一个巨大的安全¾|‘ã€?/p>

  1. 在敏捷里åQŒä»¥æŠ½è±¡æœ¯è¯­˜q›è¡Œæ€è€ƒæ˜¯å¼€å‘äh员必™åÕd…·å¤‡çš„æŠ€èƒ½ã€‚åœ¨æ•æ·ä¸­æˆ‘ä»¬åÆˆä¸åƒç€‘å¸ƒæ¨¡åž‹é‚£æ ·˜q›è¡Œé¢„先设计åQŒé€šè¿‡åˆ›å¾æŠ½è±¡å’Œå¼€å‘工作流åQŒè®¾è®¡åˆ°äº†ä¸€å®šçš„æ—¶å€™è‡ªç„¶å°±ä¼šçްíw«ã€‚敏捷中的开发äh员必™å»è‡³ž®‘精通基本的设计模式åQŒå¦åˆ™ä»–们将产生一大堆垃圾代码åQŒä»Žä¸­åªèƒ½å¾—出拙劣的设计ã€?

    TDD在这里对我们大有帮助。它要求我们按抽象术语进行思考。此外,只要我们开始修æ”ÒŽµ‹è¯•,我们ž®±å¿…™å»è€ƒè™‘˜q›è¡Œé‡æž„åQŒè®©æˆ‘们的代码变得更 好。DDT也能帮助我们立即识别ä»ÖM½•质量问题åQŒè¿™æ ·å®ƒä»¬å°±èƒ½åŠæ—¶åœ°å¾—åˆ°ä¿®å¤ã€‚è¿™æ øP¼Œæˆ‘们最¾lˆè®¤è¯†åˆ°å¿…须抛弃“首先¾~–代码,然后写测è¯?#8221;的套路,后来我们é‡? 新开始采用了TDDæ–ÒŽ³•ã€?/p>

  1. 代码质量是团队的职责åQŒå›¢é˜Ÿæˆå‘˜å°†æ—¶ä¸æ—¶çš„重构代码或者可能会重新¾~–写åQŒç›´åˆ°å®ƒ½W¦åˆé¢„先制订的标准。我们不要把ä»ÖM½•情çÈA跟我们的代码兌™” èµäh¥åQŒåº”该准备不断地抛弃或重写它。遵循Venkat Subramaniam在集体所有制实践斚w¢çš„徏议:“每次执行‹‚€å…¥ä»£ç æ“ä½œæ—¶åQŒæˆ‘们都应该致力于改善代码的质量ã€?#8221;
  1. 在瀑布模型里,需求是要签字的åQŒæœ‰ç‚¹åƒè¡€èª“,然后你再¾l§ç®‹å‘前¿UÕdŠ¨ã€‚ä½†åœ¨æ•æ·é‡ŒåQŒéœ€æ±‚与解决æ–ÒŽ¡ˆåŒæ­¥æ¼”变。这帮助我们在前˜q›çš„˜q‡ç¨‹ä¸­è®©äº? 情变得越来越清晰åQŒä½†˜q™ä¹Ÿå¯ÆD‡´¾pȝ»Ÿéœ€è¦ä¸æ—¶çš„重新设计åQŒåœ¨æœ€åˆçš„冲刺åQ?-4åQ‰é‡ŒåQŒè¿™¿Uæƒ…å†ëŠ»å¸æ€¼šå‘生。此外,Backlog也能在冲刺的中间改变åQŒå›  此,团队应该æ ÒŽ®˜q™äº›å˜åŒ–˜q›è¡Œè°ƒæ•´åQŒå› ä¸ºåœ¨æ¯ä¸ªå†²åˆº¾l“束时交付可工作的èÊY件是敏捷的åñ”右铭ã€?/li>
  1. ¾l“å¯¹ä¸€å¼€å§‹è®©äºø™§‰å¾—是‹¹ªè´¹æ—‰™—´å’Œç²¾åŠ›ã€‚ä¸¤äºÞZ¸€èµ·åœ¨åŒä¸€æ•…事上进行工作就像是各浪费了一半的旉™—´å’Œç²¾åŠ›ã€‚è€Œä¸”åQŒå¤šäººå®ŒæˆåŒä¸€æ•…事的不同ä“QåŠ¡ä¼¼ä¹Žæ˜¯å¯ÆD‡´é€Ÿåº¦ä¸‹é™çš„原因ã€?

    但是åQŒæ•æ·ä¸­çš„团队钟情于˜q™ç§åˆä½œåšäº‹çš„æ–¹å¼ï¼Œä¸å–œ‹Æ¢ç›¸åŒé¡¹ç›®ç»„或房间里的äh单枪匚w©¬åœ°å¹²‹z…R€‚当团队一起工作时åQŒä»–们会竭尽所能地把事情向前推˜q›ï¼Œ¾l“果你有极大的可能性是以一致的方式完成事情åQŒè€Œä¸æ˜¯æœ€¾lˆåœ¨å¤šä¸ªæˆ˜çº¿å¤±åˆ©ã€?/p>

  1. 在采用TDDæ—Óž¼Œ¾l“对的效果最好。Driverå’ŒNavigator一起努力开发更好的¾pȝ»Ÿã€‚但如果你是按照DDT的方式进行结对编½E‹ï¼Œ 那它ž®×ƒ¸æ˜¯æœ€ä½³çš„前进之èµ\。在˜q™ç§æƒ…况下,两个合作者都不会知道该如何前˜q›ï¼Œä¾‹å¦‚¾pȝ»Ÿè®¾è®¡åº”该像什么样子,˜q™æ ·ä½ å°†å¾—到很多噪音åQŒäñ”生最¾lˆå¿…™å»é‡å†™çš„一å ? 源代码文件ã€?

    遵åó@TDD是最佳的方式åQŒä½†è¦æ˜¯ä½ è¿˜æ²¡æœ‰é€‚应它,你仍然可以结对:利用一块玻璃(白)板,首先ç”Õd‡ºæŸä¸ªè®¾è®¡‹¹ç¨‹å›¾ï¼Œç„¶åŽå…¶ä¸­ä¸€ä¸ªåˆä½œè€…可以编写代码,而另一个则可以¾~–写‹¹‹è¯•用例ã€?/p>

  1. 在演½Cºæ—¶äº¤ä»˜å¯å·¥ä½œçš„软äšgž®±åƒæ˜¯å†²åˆºçš„“矌™•Š‹¹‹è¯•”。但是,要是软äšg不是可发布的åQŒä½ ä¼šä¸ä¼šä»…仅因䏸™ÊY件可以构建、可工作åQŒè€Œè®¤ä¸ÞZ¸€ä¸ªå†²åˆºå°±æˆåŠŸäº†å‘¢åQ?

    当个别故事全部完工而某些没有,˜q™æ ·çš„冲刺算不算成功呢?那假如冲刺的全部故事基本完成但还有些烦äh的小问题呢?

    团队应该å…Ïx³¨è®©æ•´ä¸ªæ•…事完工,所有问题得到解冻I¼Œòq¶ä¸”满èƒö完工标准åQ›è€Œä¸æ˜¯æ…Œæ…Œå¼ å¼ åœ°ç›¯ç€Backlog马虎了事。一‹Æ¡å®žæ–½è¹©è„šçš„冲刺没有 ä»ÖM½•意义åQŒé™¤äº†åœ¨¾l§ç®‹å‰è¿›ä¹‹å‰å¿…é¡»ž®†å·²å®Œæˆçš„事情返工。时间常常是一个约束条ä»Óž¼Œå› æ­¤æ ÒŽ®æ•…事的相寚w‡è¦ç¨‹åº¦ï¼Œå›¢é˜Ÿåº”该扑ևºä¸€¿Uå¯¹ä»–们提议的解å†Ïx–¹æ¡ˆæ›´å…? 质量意义的实施方法。位于Backlog™å¶ç«¯çš„æ•…事必™åÕd°½é‡ä»¥æœ€å¥½çš„æ–¹å¼å¼€å‘解冻I¼Œéšç€æˆ‘们逐渐¿UÕdŠ¨åˆ°Backlog的底部,对解å†Ïx–¹æ¡ˆçš„质量可能会有äº? 妥协åQŒä½†òq¶ä¸æ˜¯å¯¹å®Œå·¥æ ‡å‡†è€Œè¨€ã€‚对于故事的实现åQŒæ›´å¥½çš„æ–¹å¼æ˜¯å®¾~ºå‹¿æ»¥ã€?/p>

  1. ç«™ç«‹å¼ä¼šè®®æ˜¯é“å¾‹ã€‚å®ƒä»¬æ„å‘³ç€æˆäØ“ä¸€ä¸ªå…±äº«åã^収ͼŒä¸åªæ˜¯ä½ ä¸ªäh的有æœÞZ¼šå‘Šè¯‰å…¶ä»–äºÞZ½ åšè¿‡ä»€ä¹ˆå’ŒæŽ¥ä¸‹æ¥è¦åšä»€ä¹ˆã€‚äh们应该试囑֎»å€‘֐¬å‘¨é­å‘生的事情,而不只是‹‚€æŸ¥è‡ªå·Þqš„‹‚€æŸ¥è¡¨çœ‹å®Œæˆäº†å“ªäº›‹zÕdЍã€?

    庄严的站立式会议也必™åÀLŽ§åˆ¶åœ¨ä¸€å®šæ—¶é—´ä¹‹å†…ã€‚æˆ‘ä»¬å¸¸å¸æ€¼šæŠ‘制不住开始就某个问题˜q›è¡Œè®¨è®ºçš„诱惑,但那是必™å»è¦é¿å…çš„ã€?/p>

  1. 敏捷团队相当ž®ï¼Œåœ¨è¿™æ ·ä¸€ä¸ªçŽ¯å¢ƒé‡ŒåQŒähä»¬ç»å¸æ€¼šå› äؓ他们在站立式会议上的­a€è®ø™€Œè¢«ä»–äh评判。那么,你就应该说我们在彼此˜q›è¡Œè„‘力‹È€è¡æˆ–者我昨天什么也没做åQŒå†æˆ–者是我们重构了代码,而现在我搞不清楚怎么回事了之¾cȝš„事情吗?˜q™äº›éƒ½åªä¼šç»™æ–îCh造成一¿Uå°´ž®¬çš„局面ã€?/li>
  1. 计划会议肯定是费脑子和让人精疲力竭的‹zÕd„¿ã€‚坐在椅子里4个钟头确定故事点数就像是在玩轮盘赌。这些数字将军_®šåŒ…含在冲刺里的内容,但是怎样在你æ ÒŽœ¬æ²¡æœ‰¾léªŒçš„æ—¶å€™å†³å®šæ•°å­—å‘¢åQŸä½ ä¸€å®šä¼šä¼°è®¡é”™è¯¯ã€?

    但这些数字注定就是可能会出错的大致数字,˜q™åƈ不意味着你纯¾_ÒŽ˜¯é è¿æ°”来开始玩轮盘赌。这些数字在未来的几个冲åˆÞZ¹‹åŽå°†¾l™äºˆä½ æŸ¿UæŒ‡½Cºï¼Œå‘Šè¯‰ä½ èƒ½å¤Ÿå®Œæˆçš„工作量ã€?/p>

  1. 分配故事ç‚ÒŽ•°æ˜¯ä¸€ä¸ªå¤æ‚çš„ä»ÕdŠ¡åQŒåº”该按阶段完成。团队内部应该首先分析故事,òq¶ä¸Žäº§å“è´Ÿè´£äºø™¿›è¡Œè®¨è®ÞZ»¥æ¸…æ™°åœîCº†è§£éœ€æ±‚。在得到清晰的视å›? 之后åQŒå°±è¦è¿›è¡Œå¹¿æ³›çš„æŠ€æœ¯è®¨è®ºï¼Œè€ƒè™‘可以实现的最佛_¯èƒ½è§£å†Ïx–¹æ¡ˆã€‚这步要是完成不好,ž®†å¯¼è‡´åœ¨æ•…事应该如何实现斚w¢æ¨¡æ£±ä¸¤å¯åQŒè¿›è€Œå¯¼è‡´æœ‰¾~ºé™·çš„估计。假 设,如果某个故事接触åˆîCº†ä¸€ä¸ªæ–°çš„æœªæŽ¢çƒ¦é¢†åŸŸåQŒé‚£ä¹ˆå®ƒåº”该会相当复杂,即便它是一个简单的ä»ÕdŠ¡ã€‚å³ä½¿åœ¨å·²çŸ¥é¢†åŸŸåQŒæŠ€æœ¯è§£å†Ïx–¹æ¡ˆçš„ä¸åŒä¹Ÿä¼šå¯ÆD‡´æ•…事相当å¤? 杂ã€?

    ½Ž€å•干脆的故事最å®ÒŽ˜“被估½Ž—,åÏx¸…楚地知道需求是什么,再加上点应该如何实现的细节。äñ”品负责äh无法提供˜q™ä¹ˆòq²è„†çš„æ•…事。它们只能通过跟团队一赯‚®¨è®ºå¾—出来。因此,团队必须èŠÞq‚¹æ—‰™—´æ¥äØ“ä¸‹ä¸€ä¸ªå†²åˆø™¿›è¡Œè°ƒæ•´ã€?/p>

  1. 回顾ž®±åƒæ˜¯åœ¨æŠ•票旉™—´è¢«èµäºˆçš„æ¼”讲。我们应该已¾lå®Œæˆè¿™ä¸ªæˆ–那个åQŒåœ¨ä¸‹ä¸€ä¸ªå†²åˆºé‡Œæˆ‘们可以完成˜q™ä¸ªæˆ–那个,但是要是˜q™ä¸ªå†²åˆºé‡Œæ²¡æœ‰æŽ¥å—某 些活儿,什么都不会发生。äh们可以表辑ևºå¯¹äºŽä¸åŒæ–šw¢çš„æ»¡æ„ä¸Žå¦ï¼Œä½†æ˜¯å›¢é˜Ÿåº”该着çœégºŽä»Žå›ž™å„¡š„观点里得到某些具体ä“Q务,否则境况ž®†æ°¸˜qœä¿æŒä¸‹åŽ…R€?/li>

在扎˜q›æ•æ·ä¹‹å‰ï¼Œä½ å¯ä»¥åšç‚¹å‡†å¤‡å·¥ä½œï¼š

  1. 熟悉市面上的技术,ž®¤å…¶æ˜¯åƒJUnit、Fitnesse、EasyMock˜q™æ ·çš„æµ‹è¯•工兗÷€‚此外,äºÞZ»¬åº”该不断åœîCؓ更好的解å†Ïx–¹æ¡ˆè€Œå¥‹æ–—,因此出去找找改进‹¹ç¨‹çš„æ–°å·¥å…·å’Œæ–°æ–ÒŽ³•åQŒå¯»æ‰¾è§£å†›_å¤å‡ºçŽ°çš„é—®é¢˜çš„æ–°æ¡†æž¶æˆ–æ–°è®¾è®¡æ€æƒ³å’Œæ¨¡å¼ã€?/li>
  1. Venkat Subramaniamå’ŒAndy Huntçš?#8220;高效½E‹åºå‘˜çš„45个习惯:敏捷开发修ç‚ég¹‹é?#8221;是每位涉­‘Ïx•æïLš„开发者的必读书籍ã€?/li>
  1. 读读Robert C Martin在objectmentor.com上的“Craftsman series”å’?#8220;Clean Code” 。一开始,你可以不用急着去读它们åQŒä½†åœ¨ä½ ¼„°åˆ°ä¸€å †éº»çƒ¦çš„æ—¶å€™ï¼Œä½ å°±ä¼šçŸ¥é“什么时候该去读了ã€?/li>
  1. 在站立式会议/计划/讨论åQŒäh们评ä¼îC½ å»ø™®®çš„æ—¶å€™ä¸­ä¿æŒä¸€é¢—开攄¡š„心。说å‡ÞZ½ çš„观点,或者必要的时候要求帮助,你是˜q™ä¸ª™å¹ç›®çš„受益ähã€?/li>
  1. ‹¹‹è¯•不仅仅是ä¸ÞZº†ä»£ç è¦†ç›–率或质量度量。它们还提供了某¿Uç±»åž‹çš„æŒç®‹ä¿æŒæ›´æ–°çš„æ–‡æ¡£ã€‚äh们可以先看看‹¹‹è¯•代码åQŒç„¶åŽå°±çŸ¥é“该如何ä‹É用这ŒDµä»£ç äº†ã€?/li>
  1. åœ¨é¡¹ç›®å¼€å§‹å°±è‡ªåŠ¨åŒ–æž„å»ø™¿‡½E‹çš„æ‰€æœ‰äº‹æƒ…。如果像Checkstyle˜q™æ ·çš„小事都遗漏了,那么它的¾l“æžœè·Ÿå…¶ä»–æ¨¡åž‹é‡Œçš„ä¸€æ øP¼Œè¯´å¾—多做得少。当你意识到˜q™ä¸€ç‚¹ï¼Œæ±‚助于某¿Uè¡¥æ•‘手ŒD‰|—¶åQŒæ—¶é—´å¾€å¾€éƒ½å¤ªæ™šäº†ã€?/li>

学会说A到ZåQŒç„¶åŽå†è®©ä½ å¿˜è®°åQŒé‡æ–°å­¦Z到A往往不会太容易。这会带来些痛苦åQŒä½†å®Œæˆè½¬å˜ä¹‹åŽåQŒä½ ž®×ƒ¼šçŸ¥é“˜q™æ ·åšæ˜¯å€¼å¾—çš„ã€?/p>

话就说这么多åQŒåŒå¿—们åQŒä¸Šè·¯å§åQï¼:)

查看英文原文åQ?a >Confessions of A New Agile Developer



]]>IPhone½E‹åºå‘布到应用程序商店的‹¹ç¨‹åQˆè{åQ?/title><link>http://www.aygfsteel.com/sealyu/archive/2010/11/23/338775.html</link><dc:creator>seal</dc:creator><author>seal</author><pubDate>Tue, 23 Nov 2010 04:46:00 GMT</pubDate><guid>http://www.aygfsteel.com/sealyu/archive/2010/11/23/338775.html</guid><wfw:comment>http://www.aygfsteel.com/sealyu/comments/338775.html</wfw:comment><comments>http://www.aygfsteel.com/sealyu/archive/2010/11/23/338775.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/sealyu/comments/commentRss/338775.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/sealyu/services/trackbacks/338775.html</trackback:ping><description><![CDATA[<p>用传真机试过N‹Æ¡ï¼Œåˆç”¨faxzero试过N‹Æ¡ä»¥åŽï¼Œå…¨éƒ¨éƒ½æ½Cºå¤±è´¥ã€‚但是,世事如此难料åQŒä»Šå¤©å‡Œæ™¨æ”¶åˆîCº†ä¿¡ç”¨å¡å¢ƒå¤–消è´?9¾ŸŽå…ƒçš„短信提醒,早上èµäh¥ä¿¡ç®±é‡Œå°±å·²ç»æ”¶åˆ°äº†æ¿€‹zȝ åQŒç‚¹å‡»é“¾æŽ¥å°±‹È€‹zÖMº†è‡ªå·±çš„开发者è̎受÷€‚也不知道是哪一‹Æ¡ä¼ çœŸå‘成功了ã€?/p> <p>ç™Õd½•开发者中心,右侧有个Portal的链接,点击˜q›åŽ»ž®±æ˜¯è‡ªå·±è´¦å·çš„管理中心,初次˜q›å…¥æœ‰ä¸ªå‘导åQŒå¯ä»¥å¸®ä½ åˆ›å»ÞZ¸€ä¸ªå¼€å‘者证书。最好是下蝲它的å®? 整的向导说明书,是一个PDFåQ?M多,步骤˜q˜æ˜¯æŒø™¯¦¾l†çš„。但是这本手册在¾|‘上没有见过中文版的说明åQŒæ‰€ä»¥åœ¨˜q™é‡Œ½Ž€å•介¾lä¸€ä¸‹ã€?/p> <p>˜q™ä¸ªå¼€å‘者中心的用户权限分三¿Uç±»åž‹ï¼šAgentåQŒAdminåQŒDeveloper。Agent拥有完整的管理权限,Admin也可以管理用户和è¯? 书,Developer只能½Ž¡ç†è‡ªå·±çš„证书和讑֤‡ã€‚只有Agent有上传èÊY件到App Store的权利。(但是我没有看到添加其它用æˆïLš„功能åQŒå¯èƒ½éœ€è¦?99¾ŸŽå…ƒçš„èÌŽåïL±»åž‹æ‰ä¼šæœ‰åQŒæˆ‘自己的èÌŽåïL™»å½•进来就是个Agent了)ã€?/p> <p>对于个äh开发者,你需要完成以下几个过½E‹ï¼š</p> <p>甌™¯·ä¸€ä¸ªDevelopment证书 > 讄¡½®ä½ çš„IPhone手机 > 创徏一个App ID > 创徏òq¶ä¸‹è½½å®‰è£…一个Development Provisioning Profile。经˜q‡è¿™å‡ æ­¥åQŒä½ å†™çš„½E‹åºž®±å¯ä»¥è·‘在自å·Þqš„æ‰‹æœºä¸Šäº†åQˆå¦åˆ™åªèƒ½åœ¨è™šæ‹Ÿæœºé‡Œé¢è¿è¡Œï¼‰ã€?/p> <p>然后甌™¯·ä¸€ä¸ªDistribution证书 > 创徏òq¶å®‰è£…一个Distribution Provisioning Profile > ¾~–译你的½E‹åº > ž®±å¯ä»¥å‘布到App Store了ã€?/p> <p></p> <p>下面详细介绍一下:åQˆä¸çŸ¥é“有没有必要,毕竟ä¹îCº†è¯ä¹¦çš„äh都可以下载到˜q™ç¯‡å¾ˆç®€å•的英文文档åQ‰ï¼Œæ‰€æœ‰çš„介绍以中文版的Mac OS X的菜单和½E‹åºåäØ“å‡?/p> <p><strong>开发者证书安装步骤:</strong></p> <p>打开应用½E‹åºä¸­çš„“钥匙串访é—?#8221;åQŒåœ¨èœå•里点å‡?#8220;证书助理”下面çš?#8220;从证书代理请求证ä¹?#8221;åQŒæ³¨æ„ä¸‹é¢ä¸è¦é€‰ä¸­ä»ÖM½•行,否则菜单会变。输入自å·Þqš„æ³¨å†Œ EmailåQŒå¸¸ç”¨å¿U°å¯ä»¥å†™è¯¦ç»†ä¸€ç‚¹ï¼Œæ¯”如“Unfish Dev Key”åQŒä¸‹é¢é€‰ä¸­“存储到磁ç›?#8221;åQŒç‚¹¾l§ç®‹åQŒå¯èƒ½ä¼šå‡ºçŽ°æœªçŸ¥é”™è¯¯åQŒå¤šè¯•几‹Æ¡å°±OK了。然后在‹¹è§ˆå™¨ä¸­˜q›å…¥å¼€å‘者中心的Certificaties坯Dˆª™å? 面,在Development™åµé¢ä¸­æœ€ä¸‹é¢é€‰æ‹©åˆšæ‰åˆ›å¾çš„证书文ä»Óž¼Œç‚¹ä¸Šä¼ ã€‚然后证书就会显½Cºå‡ºæ¥ï¼Œ˜q˜è¦å†ç‚¹ä¸€ä¸‹åŽé¢çš„Approve按钮åQŒé¡µé¢åˆ·æ–°åŽ˜q? 个证书就可以下蝲了。下来是个ceræ–‡äšgåQŒåŒå‡ÖM¼šè‡ªåЍ坼入åQŒå¯¼å…¥ç±»åž‹é€‰æ‹©“ç™Õd½•”ž®±å¯ä»¥ã€?/p> <p>然后是添加自å·Þqš„æ‰‹æœºè®‘Ö¤‡åˆ°xcode。把手机˜qžåˆ°ç”µè„‘上,在xcodeçš„windows菜单下打开OrganizeråQŒå·¦è¾¹çš„devices下面 会列å‡ÞZ½ çš„æ‰‹æœºï¼ŒåŒ™¾¹çš„Identifier™å¹å°±æ˜¯ä½ çš„æ‰‹æœºçš„udidåQŒå¤åˆ¶ä¸‹æ¥ï¼Œå¾…ä¼šè¦ç”¨ã€‚å¦‚æžœè¿™ä¸ªæ‰‹æœø™¿˜æ²¡æœ‰è®„¡½®˜q‡ä½œä¸ºå¼€å‘机åQŒè¿™ä¸ªç•Œé¢ä¸Šåº”该会有ä¸? ä¸ªæŒ‰é’®ï¼Œç‚¹ä¸€ä¸‹å°±å¯ä»¥æŠŠå®ƒè®¾äØ“å¼€å‘æœºåQŒåœ¨xcode里点Build and go的时候就可以自动的安装你的程序到手机上,不需要通过ITunes了。在开发者中心的左边Devices坯Dˆª™åµé‡Œç‚¹Add DeviceåQŒè“v个自å·Þp®¤è¯†çš„名字åQŒæŠŠudid¾_˜è„“˜q›åŽ»ž®±å¯ä»¥äº†ã€‚(˜q™ä¸€æ­¥åªæ˜¯å¼€å‘证书有用,发布证书是不需要这个东西的。)</p> <p>然后需要创å»ÞZ¸€ä¸ªApp IDåQŒåœ¨å¼€å‘者中心的App IDs坯Dˆª™åµåˆ›å»ÞZ¸€ä¸ªæ–°çš„App IDåQŒè¿™ä¸ªApp ID需要跟½E‹åºçš„info.plist里面定义的程序Identifier相对应,如果˜q™é‡Œåªè¾“入一ä¸?åQŒé‚£ä¹ˆinfo.plist那里写什么都可以åQŒå¾è®®ç”¨*ã€?/p> <p>然后˜q›å…¥å¼€å‘者中心的Provisioning菜单åQŒåœ¨Development™åµé¢åˆ›å¾ä¸€ä¸ªæ–°çš„ProvisioningåQŒéœ€è¦é€‰æ‹©æ‰€ä½¿ç”¨çš„证 书,App IDåQŒå’Œå¯¹åº”的设备,生成以后下蝲˜q™ä¸ªprovisioningæ–‡äšgåQŒæŠŠä¸‹è²ä¸‹æ¥çš„æ–‡ä»¶æ‹–到Dock上的Xcode的图标上ž®×ƒ¼šè‡ªåŠ¨å®‰è£…˜q›åŽ»ã€‚ç„¶åŽé€€å‡? xcode重新打开åQŒæ‰“开你的™å¹ç›®åQŒæ‰“å¼€Project菜单下面的Edit Project SettingsåQŒè¿›å…¥Build™åµé¢åQŒæ‰¾åˆîC¸‹é¢çš„Code Signing IdentityåQŒæŠŠAny iPhone OS Device™å¹åŽé¢é€‰ä¸­ä½ çš„开发者证书,然后ž®±å¯ä»¥æŠŠ™å¹ç›®çš„编译目标设为DeviceåQˆè€Œä¸æ˜¯æ¨¡æ‹Ÿå™¨åQ‰ï¼Œè¯•一下Build and Go了。程序应该会¾~–è¯‘å®ŒåÆˆè‡ªåŠ¨å®‰è£…åˆîC½ çš„æ‰‹æœÞZ¸ŠåQŒåƈ自动启动了ã€?/p> <p><strong>发布证书安装步骤åQ?/strong></p> <p><span style="text-decoration: line-through;">再ä‹É用钥匙串讉K—®é‡Œé¢çš?#8220;从证书代理请求证ä¹?#8221;功能åQŒè¾“入自å·Þqš„EmailåQŒå¿U°è¦å†™è´­ä¹°è¯ä¹¦æ—¶ç™Õd½•的公司名或者个人名åQŒä¸‹é¢é€‰ä¸­“保存到磁ç›?#8221;å’?#8220;让我自己选择¿Ué’¥”åQŒä¸‹ä¸€æ­¥ï¼ŒæŠŠè¯ä¹¦ä¿å­˜ä¸‹æ¥ã€?/span></p> <p>˜q›å…¥å¼€å‘者中心Certificates里面的Distribution™åµé¢åQŒé€‰æ‹©å‰é¢ä¿å­˜çš„æ–‡ä»¶ä¸Šä¼ ï¼Œç„¶åŽApprove一下,下蝲˜q™ä¸ªè¯ä¹¦åQŒåŒå‡Õd¯¼å…¥ï¼Œ¾cÕdž‹é€‰ç™»å½•ã€?/p> <p>˜q›å…¥å¼€å¿ƒè€…中心Provisioning里面的Distribution™åµé¢åQŒæ·»åŠ æ–°çš„ProvisioningåQŒç±»åž‹é€‰App StoreåQŒï¼ˆå¦‚果选了Ad HocåQŒå°±åªæœ‰ä½ æ·»åŠ è¿‡udid的手机才能安装这个程序了åQ‰ï¼Œè¯ä¹¦åº”该是自动出现的åQŒApp ID选好åQŒåˆ›å»ºå®Œæˆï¼Œä¸‹è²˜q™ä¸ªæ–‡äšgåQŒæ‹–到xcode的图标上安装完成。退出xcode再重新打开åQŒå¦åˆ™åŠ è½½ä¸äº†ä½ åˆšåˆšæ·ÕdŠ çš„é‚£ä¸ªè¯ä¹¦ï¼Œä¼šå‡ºçŽ? Provisioning无效的提½Cºã€?/p> <p>然后打开你的™å¹ç›®åQŒè¿›å…?#8220;Edit Project Settings”åQŒè¿›å…¥Configuration™åµé¢åQŒé€‰ä¸­Release点击下面的DuplicateåQŒå¤åˆ¶ä¸€ä¸ªæ–°çš„配¾|®é¡¹å‡ºæ¥åQŒå‘½åäØ“ Distribution。然后进入Build™åµé¢åQŒé¡¶ä¸Šçš„Configuration下拉框选中DistributionåQŒä¸‹é¢çš„Code Signing Identity里面的Any iPhone OS Device后面对应的值选中你的那个Distribution的证书。然后就可以¾~–译½E‹åºäº†ã€?/p> <p>å¦‚æžœä½ ä¹‹å‰æŒ‰ç…§ç±»ä¼ÆD¿™ä¸ªæ•™½E?a title="http://www.weiphone.com/thread-222380-1-3.html" >http://www.weiphone.com/thread-222380-1-3.html</a>自己生成˜q‡è¯ä¹¦åƈ且改˜q‡Project Settingså’Œinfo.pliståQŒéœ€è¦æŠŠ˜q™ä¸¤ä¸ªåœ°æ–ÒŽ”¹å›žåŽ»åQŒå¦åˆ™ç¼–译的时候会出现一个warningåQŒCodeSign warning: <em>provisioning is not applicable for product type</em> ‘<em>Application</em>‘ in SDK ‘Device – iPhone OS 2.2′。删掉Project Setting里面的PROVISIONING_PROFILE_ALLOWED = NOå’ŒPROVISIONING_PROFILE_REQUIRED = NOåQŒä»¥åŠinfo.plistçš„SignerIdentityåQŒå†¾~–译åQŒåº”该就不会出错了ã€?/p> <p>½E‹åºå‘布到应用程序商店的步骤åQ?/p> <p>在开发者中心的Distribution坯Dˆªé‡Œé¢çš„App Store™åµé¢åQŒåœ¨ä¸‹é¢çš„App Store下面的Learn More展开åQŒå°±å¯ä»¥çœ‹åˆ°Go to iTunes Connect的链接。进入以后点击Manage My ApplicationåQŒå°±å¯ä»¥æ·ÕdŠ è‡ªå·±çš„ç¨‹åºäº†ã€?/p> <p>需要选择½E‹åºçš„语­a€åQŒå›½å®Óž¼Œä»‹ç»½{‰ç­‰åŸºæœ¬ä¿¡æ¯åQŒç„¶åŽä¸‹ä¸€æ­¥ä¸Šä¼ ç¨‹åºå’Œå…¶å®ƒå›„¡‰‡ã€‚这个地方上传的½E‹åºåQŒå°±æ˜¯æŠŠä½ çš„™å¹ç›®¾~–译以后生成的那ä¸?app的目 录直接压¾~©æˆzip上传åQŒï¼ˆ˜q™ä¸ª.app目录里面的ä“Q何文仉™ƒ½ä¸å¯ä»¥æ›´æ”¹ï¼Œå¦åˆ™½{‘֐ž®×ƒ¸å¯¹äº†åQ‰ã€‚你需要准备一å¼?12×512çš„png囄¡‰‡ä½œäØ“å¤? LogoåQŒè¿˜éœ€è¦å‡†å¤?张程序运行的界面截图åQŒåœ¨˜q™ä¸ª™åµé¢ä¸ŠæŒ¨ä¸ªé€‰Choose fileåQŒå†ç‚¹å‡»upload fileåQŒå‡ºçŽ°å¯¹å·å°±æ²¡é—®é¢˜äº†ã€‚ç„¶åŽé€‰æ‹©½E‹åºçš„ä­hæ û|¼Œé»˜è®¤æœ‰å¾ˆå¤šå¯ä»¥é€‰ï¼Œfree是免费,1æ˜?.99¾ŸŽå…ƒåQ?æ˜?.99¾ŸŽå…ƒåQŒè¯¸å¦‚æ­¤¾c…R€‚如果非免费½E? 序,你还得准备一份购买协议ã€?/p> <p>再点下一步,ž®±å¯ä»¥ç­‰å¾…ç¨‹åºå®¡æ æ€º†ã€?/p> <p>感觉ä¼ég¹Žå¾ˆå¤æ‚,不过只要按教½E‹ä¸Šçš„æ­¥éª¤ä¸€æ­¥ä¸€æ­¥çš„做,肯定是没有问题的ã€?/p> <img src ="http://www.aygfsteel.com/sealyu/aggbug/338775.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/sealyu/" target="_blank">seal</a> 2010-11-23 12:46 <a href="http://www.aygfsteel.com/sealyu/archive/2010/11/23/338775.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>iphone app 如何联机调试和发布程åº?99$) (è½?http://www.aygfsteel.com/sealyu/archive/2010/11/23/338774.htmlsealsealTue, 23 Nov 2010 04:45:00 GMThttp://www.aygfsteel.com/sealyu/archive/2010/11/23/338774.htmlhttp://www.aygfsteel.com/sealyu/comments/338774.htmlhttp://www.aygfsteel.com/sealyu/archive/2010/11/23/338774.html#Feedback0http://www.aygfsteel.com/sealyu/comments/commentRss/338774.htmlhttp://www.aygfsteel.com/sealyu/services/trackbacks/338774.html

原帖地址  http://www.cocoachina.com/bbs/read.php?tid-7923.html

˜q™ä¸¤å¤©å…¬å¸è®©æ•´ç†æ–‡æ¡£åQŒä¸€ç›´æƒ³å†™ä¸€½‹‡æ›´è¯¦ç»†çš„è”æœø™°ƒè¯•的文档åQŒè¿™‹Æ¡åˆšå¥½æ˜¯æœÞZ¼š
æˆ‘å†™çš„åªæ˜¯è”æœø™°ƒè¯•的步骤åQŒåÆˆæ²¡æœ‰æ·±å…¥çš„åŽ»å†™äØ“ä»€ä¹ˆè¿™ä¹ˆåšåQˆå…³é”®æ˜¯æˆ‘不知道åQ?br /> 希望˜q™ç¯‡æ–‡ç« å¯¹èœé¸Ÿä»¬æœ‰å¸®åŠ©ï¼Œ
高手们见了了ž®×ƒ¸è¦ç¬‘了~~

明天再接着写如何发布程�/p>

必须条äšgåQ?br /> 99$
(没这个就不用再往下看�
我的¾pȝ»Ÿæ˜?0.5.7   不同版本的系¾lŸï¼Œå¯èƒ½æœ‰ç‚¹ž®å°çš„区åˆ?br /> 首先ç™Õd½•åˆ?br /> http://developer.apple.com/iphone/index.action

如果已经购买äº?9$, ç™Õd½•˜q›åŽ»åŽä¼šçœ‹åˆ°å¦‚ä¸‹åœ°æ–¹(å›?)
  

点进åŽÖM¼šçœ‹åˆ°å¦‚下界面(å›?)
  

˜q™é‡Œæˆ‘要提一下,公司和个人的$99  Team里面的内å®ÒŽ˜¯æœ‰æ‰€ä¸åŒçš?臛_°‘我发现有不同)
公司的Team下面可以加入Member  è€Œä¸ªäººçš„不能加入Member只能是一个ähåQŒä¸˜q‡è¿™é‡Œåƈ无大¼„ï¼Œä¸å¦¨¼„æˆ‘们下面的内容ã€?br /> 点击˜q›å…¥ Certificates 看到如下内容(å›?)

点击图中¾U¢è‰²éƒ¨åˆ† ä¼šä¸‹è½½ä¸‹æ¥ä¸€ä¸ªåå­—äØ“  AppleWWDRCA.cer  çš„东è¥?br /> ˜q™ä¸ªæ˜¯è°ƒè¯•发布IPHONE ½E‹åºå¿…须的一个东西,˜q™ä¸ªä¸œè¥¿æˆ‘们只要下蝲一‹Æ¡å°±å¤Ÿäº†åQŒå³ä½¿ä½ æœ‰N个IDPåQŒé‚£ä¹ˆæ— è®ºæ˜¯è°ƒè¯•½E‹åºåQŒè¿˜æ˜¯å‘布程序,那也只需要一个,后面我们要说åˆ? Distribution™åµé¢æ—Óž¼Œä¹Ÿæœ‰˜q™ä¸ªé“¾æŽ¥åQŒå¦‚果已¾lä¸‹è½½è¿‡åQŒé‚£ä¹ˆå°±ä¸ç”¨å†ä¸‹˜q™ä¸ªäº†ã€?最初因为对˜q™ä¸ª‹¹ç¨‹ä¸æ‡‚åQŒæˆ‘下蝲了N‹Æ¡è¿™ä¸?åQ?br /> 下完之后åQŒç‚¹å‡»è¿™ä¸ªï¼Œ˜q™ä¸ªä¸œè¥¿ž®×ƒ¼šè£…到自己的机器上ã€?br /> 打开你的  Keychain Access åQŒå¦‚æžœdock里面没有åˆ?Cç›?ApplicationsUtilities下面åŽÀL‰¾Keychain AccessåQŒä¸­æ–‡åå­—好像叫” 钥匙ä¸?#8230;” 打开˜q™ä¸ªåQŒä½ ä¼šçœ‹åˆ°å¦‚ä¸?å›?)

˜q™ä»£è¡¨ä½ å·²ç»è£…è¿›åŽÖMº†ã€?/p>

下面åQŒæˆ‘们打开Keychain的这个菜å?å›?)
  

按着下面的图�br /> (�)
  

(å›?)
  

(å›?)
  

然后continute
ž®×ƒ¼šç”Ÿæˆä¸€ä¸ªCertificateSigningRequest.certSigningRequest 的文ä»Óž¼Œåœ¨ä½ çš„æ¡Œé¢ä¸Šå“?/p>

下一æ­?å›?)åQ?br />   

点击Request Certificate(�0)
  

点击Choose FileåQˆå›¾11åQ?br />

选中CertificateSigningRequest.certSigningRequest

点击ChooseåQˆå›¾12åQ?br />   

点击Submit
(å›?3)
  

点击Approve
åQˆå›¾14åQ?br />   

˜q™æ—¶ä½ çš„证书是牌Pending的状æ€?br /> åˆäh–°ä¸€ä¸ªç½‘™åµï¼ŒOKž®±å¤„于如下状æ€?br /> åQˆå›¾15åQ?br />   

˜q™æ—¶ç‚¹å‡» Download按钮åQŒä¼šå¾—到一个developer_identity.cer   双击˜q™ä¸ªæ–‡äšg
åQˆå›¾16åQ?br />   

点击OK
˜q™æ—¶å†æ‰“开你的keychain 看看 会是如下¾l“æžœ
åQˆå›¾17åQ?br />   

切记˜q™æ—¶èƒ½çœ‹åˆîC¸‹é¢é‚£ä¸?钥匙 状的东西åQŒå¦‚果没有这个,是不可能调试的,以前有时åQŒæˆ‘¾lå¸¸çœ‹ä¸åˆ°é‚£ä¸?钥匙 状的东西
OKåQŒæˆ‘们ç‘ô¾l?/p>

打开Devices 那一™å?br /> (å›?8)
  

点击 Add Devices
åQˆå›¾19åQ?br />   

¾l™è‡ªå·Þqš„讑֤‡å–个名字例如MyIPod
DeviceID ž®±æ˜¯è‡ªå·±IPod或IPHONE的机íw«å·åQ?0位)åQŒæœºíw«å·çš„获取方法有很多åQŒå¯èƒ½é€šè¿‡ xcode çš„window->Organizer 来取å¾?br /> (å›?0)
  

然后填入表中òq¶ç‚¹å‡»summit
å›?1
  

下面我们来搞APPID
å›?2


点击NewAppID

å›?3
  

½W¬ä¸€å¤„,随便写个名字ž®Þp¡Œäº†ï¼Œ 我以AppIDä¸ÞZ¾‹
½W¬äºŒå¤„,一定要注意了,一定要按着˜q™æ ·çš„æ ¼å¼å†™
我这里写的是
com.abc.*
你也可以写成 com.xyz.*    com.google.*  
ž®½é‡ä¸­é—´é‚£ä¸ªå˜é‡æœ‰ç‚¹æ„ä¹‰åQŒä¸€èˆ¬æƒ…况下是公司的名字ã€?br /> 切记一定要写成˜q™ç§æ ¼å¼åQŒä¸ç„¶ä»¥åŽä¼šæœ‰éº»çƒ?br /> 然后submit
å›?4

¾l§ç®‹Provisioning™åµé¢
å›?5
  

点击New Profile
按着我的填一�br /> �6
  

填完�Submit
å›?7
  

Download 你会得到一ä¸?DevProvision.mobileprovision 的文ä»Óž¼Œ˜q™ä¸ªæ–‡äšg是要装到手机里面çš?/p>

ž®†è¿™ä¸ªæ‹–动到organizer  é‡Œé¢
å›?8
  

拖动后如�9
  

˜q™æ—¶æ‰“开你的IPOD 你会发现åœ?nbsp; è®„¡½®->通用->描述文äšg  é‡Œé¢æœ‰ä¸ªä¸œè¥¿åQŒé‚£ž®±æ˜¯ä½ çš„证书äº?br /> 然后再双击DevProvision.mobileprovision˜q™ä¸ªæ–‡äšgåQŒç„¶åŽä½ çš„xcode ž®Þp¢«‹È€‹z»ï¼Œ˜q™æ—¶æŸ¥çœ‹Cç›?br /> Users用户名LibraryMobileDeviceProvisioning Profiles下面 是不是有了一ä¸?br /> XXXXXX-XXXXXX-XXXXX-XXXXXX.mobileprovision的文ä»Óž¼Ÿ

下面随便打开一个IPHONE的工½E?br /> 打开那个工程的plistæ–‡äšgåQŒæŠŠBundle identifieræ”ÒŽˆå¦‚下
å›?0
  

现在大概你知é?abc 是什么东西了å?br /> 打开˜q™ä¸ªå·¥ç¨‹çš„info
å›?1
  

然后按着下图改一下设¾|®ï¼ˆåˆ‡è®°é€‰ä¸­ä½ è¯¥é€‰ä¸­çš„那一™å¹ï¼‰
å›?2
  

如果你想选中的那一™åÒŽ˜¯ç°è‰²çš„,那么你前面的某些‹¹ç¨‹ä¸€å®šå‡ºäº†é—®é¢?/p>

然后˜q˜æœ‰ä¸€å¤„需要确认,如下åQˆå›¾33åQ?br />   

è¯ïL¡®è®¤ï¼Œ¾U¢è‰²æ˜¯éƒ¨åˆ†æ˜¯ä½ åº”该选中çš?br /> å›?4
  

OK
现在已经大功告成äº?99.9999%äº?br /> 选中Device…  Debug    ç„¶åŽ Build and Go
å›?5
  

½E‹åºè‚¯å®šå·²ç»è·‘在你的机器上了åQŒå¦‚果不行,那么重è“v一下你的IPODåQŒå¦‚果再不行那就重è“v一下你的电脑,如果再再不行那就自己惛_Šžæ³•å§

¾l?br /> 接着如何发布½E‹åº
打开Certificicates çš„Distribution™åµé¢
åQˆå›¾36åQ?br />   

点击 Request Certificate按钮(æœ‰ä¸Šé¢è”æœø™°ƒè¯•的步骤˜q™ä¸ª˜q‡ç¨‹ä¸€å®šå¾ˆç†Ÿäº†å?
åQˆå›¾37åQ?br />   

选中CertificateSigningRequest.certSigningRequest  æ–‡äšg(˜q™ä¸ªæ–‡äšgåœ¨è”æœø™°ƒè¯•çš„˜q‡ç¨‹ä¸­å·²¾lç”Ÿæˆè¿‡äº?åQ?br /> å›?8
  

选中然后点击Submit
å›?9
  

点击Appove
å›?0
  

˜q™æ—¶éœ€è¦åˆ·æ–îC¸€ä¸‹é¡µé?br /> å›?1
  

点击DownLoad
会得åˆîC¸€ä¸ªåä¸ºdistribution_identity.cer 的文ä»?br /> 双击˜q™ä¸ªæ–‡äšgåQŒä¼šæœ‰å¦‚下提½C?br /> å›?2
  

点击OK
然后打开keychain ž®×ƒ¼šçœ‹åˆ°å¦‚下的图
å›?3
  

˜q™æ—¶ä½ çš„电脑ž®±å·²¾lå…·å¤‡å‘布程序的证书äº?/p>

下面打开Provisioning çš„Distribution™åµé¢
å›?4
  

点击New Profile
然后按着下图填一下,Profile Name 随便写个名字ž®Þp¡Œäº?br /> å›?5
  

然后Submit
å›?6
  

åˆäh–°ä¸€ä¸?br /> å›?7
  

OK现在Download åQŒä½ ä¼šå¾—åˆîC¸€ä¸?Distribution.mobileprovision 的文ä»?br /> 双击˜q™ä¸ªæ–‡äšgåQŒä½ çš„xcode 会被‹È€‹z?br /> 查看Cç›?br /> Users用户名LibraryMobileDeviceProvisioning Profiles下面 又多了一ä¸?br /> XXXXXX-XXXXXX-XXXXX-XXXXXX.mobileprovision的文ä»?/p>

现在我们再配¾|®ä¸€ä¸‹xcode
å›?8
  

打开Configurations ™åµé¢
选中Release 然后Duplicate 一�br /> �9
  

Duplicate之后如下�br /> �0
  

我们把名字改成Distribution
å›?1
  

接着我们切换到Build ™åµé¢
å›?2
  

图中1处选中Distribution   2处选中Distribution
然后
å›?3
  

å›?4
  

¼‹®å®šå›?4中,是你应该选的åQŒä¸ç„¶build时会出现½{‘֐é”™è¯¯

¼‹®å®šä¹‹åŽåQŒç‘ô¾l?br /> å›?5
  

选中Device �Distribution
OK
å›?6
  

Build  OK  å¤§åŠŸå‘Šæˆäº?9.9%äº?/p>

˜q™æ—¶å¦‚果有签名错误,那一定是你上面某个地方出了问é¢?/p>

成功�br /> �7
  

其中的iHide ž®±æ˜¯æˆ‘们要上传的东西åQŒåœ¨ä¸Šä¼ ä¹‹å‰åQŒæˆ‘们要把他压羃æˆ?zip åŒ?/p>

现在我们在浏览器中输�br /> itunesconnect.apple.com
ç™Õd½•一ä¸?br /> å›?8
  

˜q›å…¥Manage Your Applications
å›?9
  

点击Add New Application
……………

OK�br /> 后面的不说了~~~

工具下蝲见原帖地址 http://www.cocoachina.com/bbs/read.php?tid-7923.html



]]>
How to Add iAd Banner in iPhone Apphttp://www.aygfsteel.com/sealyu/archive/2010/11/20/338569.htmlsealsealSat, 20 Nov 2010 14:58:00 GMThttp://www.aygfsteel.com/sealyu/archive/2010/11/20/338569.htmlhttp://www.aygfsteel.com/sealyu/comments/338569.htmlhttp://www.aygfsteel.com/sealyu/archive/2010/11/20/338569.html#Feedback0http://www.aygfsteel.com/sealyu/comments/commentRss/338569.htmlhttp://www.aygfsteel.com/sealyu/services/trackbacks/338569.htmlIn April 2010 during iOS 4 presentation Steve Jobs announced new advertisement platform – iAd. This platform is intended to allow developers of free apps to earn on their apps showing advertisement. The main idea of iAd is to connect interactivity (using smartphone or tablet) and emotionality of advertisement (JavaScript, HTML5, CSS3, multi-touch). It allows to create absolutely awesome advertisement which looks like apps with video and audio. In addition, iAd ads is opened inside the app and user do not exit his app and can get back anytime he wants.

Below is the guide on how to add iAd banner into iPhone app. Guide is based on iAd Programming Guide and WWDC 2010 video.

Add iAd Banner to iPhone App

The first thing you need to do is to add iAd.framework in your Xcode project which is contained in iOS 4 SDK. Also do not forget to add #import <iAd/iAD.h>. Developers can choose between two banners: 320×50 px for portrait and 480×32 px for landscape. The base of banner is ADBannerView, which is subclass of UIView. So the only thing you have to do is to add this view in your control elements hierarchy (you can do this programmatically or using Interface Builder).

iOS 4 SDK Interface Builder

Apple recommends to put banner at the bottom or at the top of the window and do not place it on any moving elements like ScrollView or TableView as far as that will decrease shows of banner (and your revenue respectively) and will make it more difficult for user to tap on the ads.

Let’s create a new project in Xcode using View-based Application template and add a banner into it. Name of the app – iAdEx. We are going to edit iAdExViewController.h

1
2
3
4
5
6
7
8
9
10
#import <UIKit/UIKit.h>;
#import <iAd/iAd.h>;
 
@interface iAdExViewController : UIViewController <ADBannerViewDelegate>
{
      ADBannerView *adView;
      BOOL bannerIsVisible;
}
@property (nonatomic,assign) BOOL bannerIsVisible;
@end

and modify viewDidLoad method in iAdExViewController.m

1
2
3
4
5
6
7
8
9
10
- (void)viewDidLoad {
      adView = [[ADBannerView alloc] initWithFrame:CGRectZero];
      adView.frame = CGRectOffset(adView.frame, 0, -50);
      adView.requiredContentSizeIdentifiers = [NSSet setWithObject:ADBannerContentSizeIdentifier320x50];
      adView.currentContentSizeIdentifier = ADBannerContentSizeIdentifier320x50;
      [self.view addSubview:adView];
      adView.delegate=self;
      self.bannerIsVisible=NO;
      [super viewDidLoad];
}

Let’s talk about requiredContentSizeIdentifiers and currentContentSizeIdentifier properties. In the first one you define all types of banners you are going to use. And the second property defines which type of banner you are going to use at the present moment.

Connection issues

Banners are downloaded from the network. What if we have no network connection right now? Or Apple has any issues with ads server? Our ADBannerView will be empty is these cases. It doesn’t look very nice and wastes space on the screen. Apple recommends to do it in this way: when there is no banner for any reason remove it from the screen; when banner is received – show it again.

We have the ADBannerViewDelegate in our class and it can receive messages from banner – bannerViewDidLoadAd (when banner is loaded successfully) and didFailToReceiveAdWithError (when any problems occured). Let’s implement these messages:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
- (void)bannerViewDidLoadAd:(ADBannerView *)banner
{
 if (!self.bannerIsVisible)
 {
  [UIView beginAnimations:@"animateAdBannerOn" context:NULL];
// banner is invisible now and moved out of the screen on 50 px
  banner.frame = CGRectOffset(banner.frame, 0, 50);
  [UIView commitAnimations];
  self.bannerIsVisible = YES;
 }
}
 
- (void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error
{
if (self.bannerIsVisible)
 {
  [UIView beginAnimations:@"animateAdBannerOff" context:NULL];
// banner is visible and we move it out of the screen, due to connection issue
  banner.frame = CGRectOffset(banner.frame, 0, -50);
  [UIView commitAnimations];
  self.bannerIsVisible = NO;
 }
}

It’s time to launch the app and see what we have now:

iAd banner on iPhone

Tap the banner

iAd Detailed View on iPhone Simulator

And that’s it – we’ve done it in accordance with Apple’s recommendations. When we launch the app we see the banner. If we tap it, then full view of advertisement is shown. But we still have one issue…

Stop & Resume your app

In real app we should stop any application’s activity such as video, audio playback or pause game. In order to solve this task we will create two methods bannerViewActionShouldBegin (when full screen ad is shown) and bannerViewActionDidFinish (when we close ads).

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
- (BOOL)bannerViewActionShouldBegin:(ADBannerView *)banner willLeaveApplication:(BOOL)willLeave
{
 NSLog(@"Banner view is beginning an ad action");
 BOOL shouldExecuteAction = YES;
 if (!willLeave && shouldExecuteAction)
    {
    // stop all interactive processes in the app
    // [video pause];
    // [audio pause];
    }
 return shouldExecuteAction;
}
 
- (void)bannerViewActionDidFinish:(ADBannerView *)banner
{
   // resume everything you've stopped
   // [video resume];
   // [audio resume];
}

Change Orientation of iAd

What else should we do? We need to make banner change it’s orientation in accordance with iPhone position. First of all we need to change the line where we define types of banners which we will use:

1
2
3
4
5
- (void)viewDidLoad {
...
adView.requiredContentSizeIdentifiers = [NSSet setWithObjects:ADBannerContentSizeIdentifier320x50,ADBannerContentSizeIdentifier480x32,nil];
...
}

and here are methods for changing orientation:

1
2
3
4
5
6
7
8
9
10
11
12
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
 // Return YES for supported orientations
 return (interfaceOrientation == UIInterfaceOrientationPortrait|UIInterfaceOrientationPortrait);
}
 
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{
 if (UIInterfaceOrientationIsLandscape(toInterfaceOrientation))
  adView.currentContentSizeIdentifier = ADBannerContentSizeIdentifier480x32;
 else
  adView.currentContentSizeIdentifier = ADBannerContentSizeIdentifier320x50;
}

And here is how it look in a landscape

iAd banner in landscape mode

When device changes orientation we change currentContentSizeIdentifier property of ADBannerView. Now we can see banners in landscape mode too. There is still 50 px offset, but it’s easy to fix.

Apple developers also recommend to write object.delegate=nil; line before deallocating ADBannerView object. In our example it will look like:

1
2
3
4
5
- (void)dealloc {
 adView.delegate=nil;
 [adView release];
 [super dealloc];
}

Now we have finished with programming part. Good luck with Apple iAd!



]]>
Cydia commCenter 补丁更新问题的解å†Ïx–¹æ³?/title><link>http://www.aygfsteel.com/sealyu/archive/2010/11/19/338492.html</link><dc:creator>seal</dc:creator><author>seal</author><pubDate>Fri, 19 Nov 2010 09:10:00 GMT</pubDate><guid>http://www.aygfsteel.com/sealyu/archive/2010/11/19/338492.html</guid><wfw:comment>http://www.aygfsteel.com/sealyu/comments/338492.html</wfw:comment><comments>http://www.aygfsteel.com/sealyu/archive/2010/11/19/338492.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/sealyu/comments/commentRss/338492.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/sealyu/services/trackbacks/338492.html</trackback:ping><description><![CDATA[Sealyu  2010-11-19<br /> <br /> ¾pȝ»Ÿ iphoneOS4.1, Cydia<br /> <br /> 最˜q‘æ›´æ–°Cydia的时候æ€ÀL˜¯å‡ºé”™åQŒåœ¨æ›´æ–°Commcenter补丁的时候说要先卸蝲bspatchåQŒä½†æ˜¯åœ¨å®‰è£…bsdiff的时候,bsdiff里也包含bspatchåQŒæ‰€ä»¥åœ¨é˜Ÿåˆ—安装的时候没法满­‘³ä¾èµ–å…³¾p»ï¼Œå¯ÆD‡´Cydia卡在那里ã€?br /> <br /> 在用¾lˆç«¯åQˆTerminalåQ‰ä‹É用root账户˜q›å…¥iphoneæ–‡äšg¾pȝ»ŸåŽï¼Œå‘现跟Ubuntu½{‰ç±»Debian¾pȝ»Ÿå·®ä¸å¤šï¼ŒåŒæ ·å®‰è£…软äšg可以适用dpkgå’Œapt-getã€?br /> 所以参考Ubuntu下安装èÊY件的解决æ–ÒŽ³•åQŒç»ˆäºŽè§£å†³äº†˜q™ä¸ªå›°æ‰°äº†å‡ å¤©çš„问题ã€?br /> <br /> 解决æ–ÒŽ³•如下åQ?br /> 1. 打开¾lˆç«¯åQˆTerminalåQ? loading完后åQŒè¾“å…¥suåQŒå›žè½¦ã€?br /> 2. 输入密码åQŒé»˜è®¤äØ“åQšalpine<br /> 3. 输入åQšdpkg -i --force-overwrite /var/cache/apt/archives/XXX 。(其中的XXX为提½Cø™¯´æ— æ³•覆盖的那个bsdiff_4.3-1xxxxx.deb那个文äšgåQ‰å›žè½?br /> 4. 输入åQ?apt-get upgrade, 回èžRã€?br /> 4. 重启iphone<br /> 5. ˜q›å…¥Cydia查看更新åQŒæžå®?br /> <br /> <img src ="http://www.aygfsteel.com/sealyu/aggbug/338492.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/sealyu/" target="_blank">seal</a> 2010-11-19 17:10 <a href="http://www.aygfsteel.com/sealyu/archive/2010/11/19/338492.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>dpkg error: trying to overwrite X, which is also in package Yhttp://www.aygfsteel.com/sealyu/archive/2010/11/18/338428.htmlsealsealThu, 18 Nov 2010 14:06:00 GMThttp://www.aygfsteel.com/sealyu/archive/2010/11/18/338428.htmlhttp://www.aygfsteel.com/sealyu/comments/338428.htmlhttp://www.aygfsteel.com/sealyu/archive/2010/11/18/338428.html#Feedback0http://www.aygfsteel.com/sealyu/comments/commentRss/338428.htmlhttp://www.aygfsteel.com/sealyu/services/trackbacks/338428.html今天ubuntu9.10 alpha4 升çñ”出现了点问题åQ?/p>
Preparing to replace language-pack-zh 1:9.10 (using .../language-pack-zh_1%3a9.10+20090805_all.deb) ...
Unpacking replacement language-pack-zh ...
Preparing to replace language-pack-zh-base 1:9.10 (using .../language-pack-zh-base_1%3a9.10+20090805_all.deb) ...
Unpacking replacement language-pack-zh-base ...
dpkg: error processing /var/cache/apt/archives/language-pack-zh-base_1%3a9.10+20090805_all.deb (--unpack):
trying to overwrite `/usr/share/locale-langpack/zh_TW/LC_MESSAGES/sed.mo', which is also in package language-pack-zh-hant-base
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Preparing to replace language-pack-gnome-zh 1:9.10 (using .../language-pack-gnome-zh_1%3a9.10+20090805_all.deb) ...
Unpacking replacement language-pack-gnome-zh ...
Preparing to replace language-pack-gnome-zh-base 1:9.10 (using .../language-pack-gnome-zh-base_1%3a9.10+20090805_all.deb) ...
Unpacking replacement language-pack-gnome-zh-base ...
dpkg: error processing /var/cache/apt/archives/language-pack-gnome-zh-base_1%3a9.10+20090805_all.deb (--unpack):
trying to overwrite `/usr/share/locale-langpack/zh_TW/LC_MESSAGES/gnome-settings-daemon.mo', which is also in package language-pack-gnome-zh-hant-base

中文的显½Cºæ˜¯˜q™æ ·åQ?/p>

(正在è¯Õd–数据åº?... ¾pȝ»Ÿå½“前æ€Õd…±å®‰è£…æœ?123909 个文件和目录ã€?
正在解压¾~?language-pack-gnome-zh-hans-base (ä»?.../language-pack-gnome-zh-hans-base_1%3a9.10+20090819_all.deb) ...
dpkgåQšå¤„ç?/var/cache/apt/archives/language-pack-gnome-zh-hans-base_1%3a9.10+20090819_all.deb (--unpack)时出错:
正试图覆ç›?#8220;/usr/share/locale-langpack/zh_CN/LC_MESSAGES/gnome-settings-daemon.mo”åQŒå®ƒå±žäºŽè½¯äšgåŒ?language-pack-gnome-zh-base
dpkg-deb: 子进½E?¾_˜è„“ 被信å?Broken pipe)¾lˆæ­¢äº?br /> 正在解压¾~?language-pack-gnome-zh-hant-base (ä»?.../language-pack-gnome-zh-hant-base_1%3a9.10+20090819_all.deb) ...
dpkgåQšå¤„ç?/var/cache/apt/archives/language-pack-gnome-zh-hant-base_1%3a9.10+20090819_all.deb (--unpack)时出错:
正试图覆ç›?#8220;/usr/share/locale-langpack/zh_TW/LC_MESSAGES/gnome-settings-daemon.mo”åQŒå®ƒå±žäºŽè½¯äšgåŒ?language-pack-gnome-zh-base
dpkg-deb: 子进½E?¾_˜è„“ 被信å?Broken pipe)¾lˆæ­¢äº?br /> 在处理时有错误发生:
/var/cache/apt/archives/language-pack-gnome-zh-hans-base_1%3a9.10+20090819_all.deb
/var/cache/apt/archives/language-pack-gnome-zh-hant-base_1%3a9.10+20090819_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

¾cÖM¼¼˜q™æ ·çš„错误:

dpkg: error processing /var/cache/apt/archives/AAA (–unpack):
trying to overwrite `/usr/lib/BBB‘, which is also in package CCC
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Errors were encountered while processing:
AAA
E: Sub-process /usr/bin/dpkg returned an error code (1)
解决æ–ÒŽ³•åQ?/p>

sudo dpkg -i --force-overwrite AAA

(give full path of AAA), and then run

sudo apt-get -f install

again.



]]>
解决CYDIA提示wrong language code zh-Hans错误的解å†Ïx–¹æ³?/title><link>http://www.aygfsteel.com/sealyu/archive/2010/11/18/338422.html</link><dc:creator>seal</dc:creator><author>seal</author><pubDate>Thu, 18 Nov 2010 12:25:00 GMT</pubDate><guid>http://www.aygfsteel.com/sealyu/archive/2010/11/18/338422.html</guid><wfw:comment>http://www.aygfsteel.com/sealyu/comments/338422.html</wfw:comment><comments>http://www.aygfsteel.com/sealyu/archive/2010/11/18/338422.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/sealyu/comments/commentRss/338422.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/sealyu/services/trackbacks/338422.html</trackback:ping><description><![CDATA[<strong><font size="5">1åQŒç”¨(ifile, winscp)<span onclick="tagshow(event)" class="t_tag">软äšg</span>打开òq¶è¿›å…?private/etc/apt目录 <br /> 2åQŒé‡å‘½å<span onclick="tagshow(event)" class="t_tag">æ–‡äšg</span>夹sources.list.dåQŒéšä¾¿ä½ å«ä»€ä¹ˆåå­—,或者传到硬盘备份ã€?<br /> 3åQŒæ–°å»ÞZ¸€ä¸ªæ–‡ä»¶å¤¹å«sources.list.dåQŒæƒé™?75 <br /> 4åQŒæ‰“å¼€<span onclick="tagshow(event)" class="t_tag">cydia</span>åQŒä½ ä¼šå‘现package里已安装文äšg都出çŽîCº†åQŒä¸˜q‡source里的源都没有了,不过无ä“Q何报错了 <br /> 5åQŒå…³é—­cydiaåQŒé‡æ–°èÊY件回前面的文件夹åQŒæŠŠè‡ªå·±å»ºçš„sources.list.d¾l™åˆ äº†ï¼ŒæŠŠå‰é¢æ”¹åçš„æ–‡äšgå¤ÒŽ”¹å›žæ¥åQŒæƒé™æ”¹ä¸?75 <br /> <br /> <font color="#ff0066">7, 删除 /private/var/lib/cydia/metadata.plist å’?/private/etc/apt/sources.list.d/cydia.list</font></font></strong> <br /> <font color="#ff0066"><font size="5"><strong>8åQŒé‡æ–°æ·»åŠ ä½ å–œæ¬¢çš„æº</strong></font></font> <br /> <br /> 以下是我常用çš?<br /> <br /> <strong><font size="5">deb <font color="#0070af">http://www.sinfuliphonerepo.com/</font></font></strong><strong><font size="5"> ./ <br /> deb <font color="#0070af">http://repo.beyouriphone.com/</font></font></strong><strong><font size="5"> ./ <br /> deb <font color="#0070af">http://www.iphone.org.hk/apt/</font></font></strong><strong><font size="5"> ./ <br /> deb <font color="#0070af">http://wap.ucweb.com/iphone/cydia/</font></font></strong><strong><font size="5"> ./ <br /> deb <font color="#0070af">http://app.weiphone.com/cydia/</font></font></strong><strong><font size="5"> ./ <br /> deb <font color="#0070af">http://cydia.xsellize.com/</font></font></strong><strong><font size="5"> ./ <br /> deb <font color="#0070af">http://iphonevideorecorder.com/3/</font></font></strong><strong><font size="5"> ./ <br /> deb <font color="#0070af">http://cydia.hackulo.us/</font> ./ <br /> deb <font color="#0070af">http://cydia.clezz.com/ </font>./ <br /> deb <font color="#0070af">http://cydis.pushfix.info/ </font>./ <br /> deb <font color="#0070af">http://iphone..com/cydia/ </font>./</font></strong> <br /> <br /> <font size="5"><strong>9åQŒè‡³æ­¤ä»ŠåŽæ‰“å¼€Cydiaž®†ä¸ä¼šå†å‡ºçްwrong language code zh-Hans  äº†ã€?</strong></font> <img src ="http://www.aygfsteel.com/sealyu/aggbug/338422.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/sealyu/" target="_blank">seal</a> 2010-11-18 20:25 <a href="http://www.aygfsteel.com/sealyu/archive/2010/11/18/338422.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Custom action on Back Button UINavigationControllerhttp://www.aygfsteel.com/sealyu/archive/2010/11/13/338008.htmlsealsealSat, 13 Nov 2010 15:12:00 GMThttp://www.aygfsteel.com/sealyu/archive/2010/11/13/338008.htmlhttp://www.aygfsteel.com/sealyu/comments/338008.htmlhttp://www.aygfsteel.com/sealyu/archive/2010/11/13/338008.html#Feedback0http://www.aygfsteel.com/sealyu/comments/commentRss/338008.htmlhttp://www.aygfsteel.com/sealyu/services/trackbacks/338008.htmlYes! There is a way of using the backBarButton with a custom action. No, it’s not by overriding the backBarButton property of navigationItem. This is not an ugly solution with images that simulate the “Back”-button (arrow-shaped.) It’s possible to use the backBarButton for popping the current viewController as normal, but than with other animations such as UIViewAnimationTransitionCurlDown.

Enough said, the solution is simple. You have to subclass your navigationController’s  popViewControllerAnimated:(BOOL)animated. So create a custom navigationController:

customNavigationController.h

#import
@interface customNavigationController : UINavigationController {}
@end

And a custom “popViewControllerAnimated:(BOOL)animated”, this popViewControllerAnimated-function uses the “UIViewAnimationTransitionCurlDown” when popping from a SettingsTableView.

customNavigationController.m

#import "customNavigationController.h"
#import "SettingsTableController.h"
 
@implementation customNavigationController
 
- (UIViewController *)popViewControllerAnimated:(BOOL)animated
{
if([[self.viewControllers lastObject] class] == [SettingsTableController class]){
 
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration: 1.00];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlDown
forView:self.view cache:NO];
 
UIViewController *viewController = [super popViewControllerAnimated:NO];
 
[UIView commitAnimations];
 
return viewController;
} else {
return [super popViewControllerAnimated:animated];
}
}
@end

Use your custom navigationController in your appDelegate:

customNavigationController *navigationController =
[[customNavigationController alloc]
initWithRootViewController:rootView];



]]>
NavigationController坯Dˆªæ ä¸­æ·ÕdŠ å¤šä¸ªUIBarButtonItem(è½?http://www.aygfsteel.com/sealyu/archive/2010/11/13/338006.htmlsealsealSat, 13 Nov 2010 14:37:00 GMThttp://www.aygfsteel.com/sealyu/archive/2010/11/13/338006.htmlhttp://www.aygfsteel.com/sealyu/comments/338006.htmlhttp://www.aygfsteel.com/sealyu/archive/2010/11/13/338006.html#Feedback0http://www.aygfsteel.com/sealyu/comments/commentRss/338006.htmlhttp://www.aygfsteel.com/sealyu/services/trackbacks/338006.html 在实际的开发中åQŒå¯¼èˆªå™¨æ˜¯æœ€é‡è¦çš„容器之一åQŒæˆ‘们经常要在导航栏中添加各¿Uæ ·å¼çš„æŒ‰é’®åQŒæ·»åŠ ä¸€ä¸ªæŒ‰é’®å¾ˆ½Ž€å•,代码如下图: UIBarButtonItem *anotherButton = [[UIBarButtonItem alloc] initWithTi

在实际的开发中åQŒå¯¼èˆªå™¨æ˜¯æœ€é‡è¦çš„容器之一åQŒæˆ‘们经常要在导航栏中添加各¿Uæ ·å¼çš„æŒ‰é’®åQŒæ·»åŠ ä¸€ä¸ªæŒ‰é’®å¾ˆ½Ž€å•,代码如下图:

UIBarButtonItem *anotherButton = [[UIBarButtonItem alloc] initWithTitle:@"Setting" style:UITabBarSystemItemContacts
                                                                 target:self action:@selector(clickSettings:)];         
self.navigationItem.rightBarButtonItem = anotherButton;
[anotherButton release];

其中按钮的样式可以有多种åQŒå…·ä½“的可以参考:https://developer.apple.com/library/ios/prerelease/#documentation/UIKit/Reference/UIBarButtonItem_Class/

在有些项目中要在右面æ·ÕdŠ ä¸¤ä¸ªæŒ‰é’®åQŒå®žçŽ°çš„æ ·å¼å¦‚ä¸‹å›¾ï¼š

 

 

实现的代码如下图åQ?/p>

UIToolbar* tools = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 0, 150, 45)];
[tools setTintColor:[self.navigationController.navigationBar tintColor]];
[tools setAlpha:[self.navigationController.navigationBar alpha]];
NSMutableArray* buttons = [[NSMutableArray alloc] initWithCapacity:2];

UIBarButtonItem *anotherButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd
                        target:self action:@selector(clickSettings:)];

UIBarButtonItem *anotherButton1 = [[UIBarButtonItem alloc] initWithTitle:@"Edit" style:UITabBarSystemItemContacts
                                                        target:self action:@selector(clickEdit:)];
[buttons addObject:anotherButton];
[anotherButton release];
[buttons addObject:anotherButton1];
[anotherButton1 release];
[tools setItems:buttons animated:NO];
[buttons release];
UIBarButtonItem *myBtn = [[UIBarButtonItem alloc] initWithCustomView:tools];
self.navigationItem.rightBarButtonItem = myBtn;

[myBtn release];
[tools release];



]]>
æ–‡äšg操作 åQ?Objective C 2.0åQˆè{åQ?/title><link>http://www.aygfsteel.com/sealyu/archive/2010/11/12/337952.html</link><dc:creator>seal</dc:creator><author>seal</author><pubDate>Fri, 12 Nov 2010 13:32:00 GMT</pubDate><guid>http://www.aygfsteel.com/sealyu/archive/2010/11/12/337952.html</guid><wfw:comment>http://www.aygfsteel.com/sealyu/comments/337952.html</wfw:comment><comments>http://www.aygfsteel.com/sealyu/archive/2010/11/12/337952.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/sealyu/comments/commentRss/337952.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/sealyu/services/trackbacks/337952.html</trackback:ping><description><![CDATA[NSFileManager can: <div>Create a new file</div> <div>Read from an exiting file</div> <div>Write da<wbr>ta to file</div> <div>Rename a file</div> <div>Remove (delete a file)</div> <div>Test for the existence of a file</div> <div>Determine the size of a file as well as other attributes</div> <div>Make a copy of a file</div> <div>Test two files to see whether their contents are equal</div> <div><br /> </div> <div><span style="white-space: pre;"> </span>˜q™äº›æ“ä½œéƒ½å¯ä»¥è¢«åœ¨directories下执行。例如你创徏一个目录,è¯Õd‡ºå…¶ä¸­å…ƒç´ æˆ–者删除。另一个特色是link files。也ž®±æ˜¯åQŒä¸€ä¸ªç›¸åŒçš„æ–‡äšg存在在两个不同的名字下,或许甚至是不同的目录下ã€?/div> <div><br /> </div> <div><span style="white-space: pre;"> </span>ä¸ÞZº†æ‰“å¼€ä¸€ä¸ªæ–‡ä»¶åÆˆæ‰§è¡Œå¤šæ¬¡è¯Õd†™æ“ä½œåQŒä½ ç”¨NSFileHandle提供的方法。主要:</div> <div><span style="white-space: pre;"> </span>Open a file or reading, writing , or updating (reading and writing)</div> <div><span style="white-space: pre;"> </span>Seek to a specified position within a file</div> <div><span style="white-space: pre;"> </span>Read or write a specified number of bytes from and to a file.</div> <div><span style="white-space: pre;"> </span>˜q™ä¸ª¾cÀLä¾›çš„æ–ÒŽ³•也可以被应用在Device 或è€?socket上ã€?/div> <div><br /> </div> <div><span style="font-size: large;">½Ž¡ç†æ–‡äšg和目录:NSFileManager</span></div> <div>       一个文件或者目录被通过pathname 唯一的定义给NSFileManagerã€?一个pathnamež®±æ˜¯ä¸€ä¸ªNSString¾cÕdž‹å¯¹è±¡èƒ½è¢«ç›¸å…³è”或者是全部的pathnameã€?/div> <div><span style="white-space: pre;"> </span>一 个相兌™”çš„pathname是关联到当前目录的那个pathname ã€?所以文件名字copy1.m ž®†æ„å‘³ç€˜q™ä¸ªæ–‡äšg在当前的目录ã€?#8220;åQ?#8221;åQˆSlashåQ?实际上是根目录。/usersåQsomone 是一个pathname 指定3个目å½?åQ? 根目录,users目录和someone目录ã€?/div> <div><span style="white-space: pre;"> </span>~被用来¾~©å†™ä¸€ä¸ªç”¨æˆïLš„ä¸È›®å½•比如~linda åQ?åQusers åQ?lindaã€?在UNIX¾cÕdž‹çš„pathname里面 “ ." ž®±æ˜¯å½“前目录". . "ž®±æ˜¯çˆ¶ç›®å½•(上一¾U§ï¼‰</div> <div><br /> </div> <div><br /> </div> <div>NSData:</div> <div>用这个类来处理文件的时候,你常帔Rœ€è¦è¯»å‡ÞZ¸€ä¸ªäÍ时区域中的变量,通常叫做bufferåQˆç¼“冲区åQ‰ã€‚NSData¾cÀLä¾›ä¸€ä¸ªç®€å•的方式建立¾~“冲区,è¯Õd‡ºé‡Œé¢æ–‡äšg的内容,或者写一个buffer中的内容åˆîC¸€ä¸ªæ–‡ä»¶ã€?/div> <div>你可以定义可变的或者不可变的存储空间ã€?/div> <div><br /> </div> <img src ="http://www.aygfsteel.com/sealyu/aggbug/337952.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/sealyu/" target="_blank">seal</a> 2010-11-12 21:32 <a href="http://www.aygfsteel.com/sealyu/archive/2010/11/12/337952.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>iPhone开发之全局变量的ä‹Éç”?è½?http://www.aygfsteel.com/sealyu/archive/2010/11/12/337944.htmlsealsealFri, 12 Nov 2010 12:57:00 GMThttp://www.aygfsteel.com/sealyu/archive/2010/11/12/337944.htmlhttp://www.aygfsteel.com/sealyu/comments/337944.htmlhttp://www.aygfsteel.com/sealyu/archive/2010/11/12/337944.html#Feedback0http://www.aygfsteel.com/sealyu/comments/commentRss/337944.htmlhttp://www.aygfsteel.com/sealyu/services/trackbacks/337944.html全局变量历来ž®±æ˜¯å¾ˆå¥½çš„东西,能够在开发中带来很多方便åQŒä¸‹é¢æ¥ä»‹ç»ä¸€ä¸‹iPhone中èÊY件开发时全局变量的ä‹É用方法:

一、新建Constants.hæ–‡äšgåQˆæ–‡ä»¶åæ ÒŽ®éœ€è¦è‡ªå·±å–åQ‰ï¼Œç”¨äºŽå­˜æ”¾å…¨å±€å˜é‡åQ?/p>

二、在Constants.h中写入你需要的全局变量名,例如åQ?/p>

Object-C代码
  1. NSString *master_url;//指针¾cÕdž‹
  2. int count;//非指针类�br />

注意åQšåœ¨å®šä¹‰å…¨å±€å˜é‡çš„æ—¶å€™ä¸èƒ½åˆå§‹åŒ–åQŒå¦åˆ™ä¼šæŠ¥é”™åQ?/p>

三、在需要用到全局变量的文件中引入此文ä»Óž¼š

Object-C代码
  1. #import "Constants.h"  

四、给全局变量初始化或者赋å€û|¼š

Object-C代码
  1. extern NSString *master_url;  
  2. master_url = [[NSString alloc] initWithFormat:@"http://www.wuleilei.com"];//指针¾cÕdž‹åQ›éœ€è¦alloc
  3. extern int count;
  4. count = 0;//非指针类�/span>

五、ä‹É用全局变量åQšå’Œä½¿ç”¨æ™®é€šå˜é‡ä¸€æ ·ä‹É用ã€?/p>


转自åQšhttp://www.wuleilei.com/Blog/193



]]>
Mac½E‹åºå¼€å‘基¼‹€åQšå¾—åˆîC¸€ä¸ªç›®å½•内的内å®?è½?http://www.aygfsteel.com/sealyu/archive/2010/11/12/337907.htmlsealsealFri, 12 Nov 2010 06:27:00 GMThttp://www.aygfsteel.com/sealyu/archive/2010/11/12/337907.htmlhttp://www.aygfsteel.com/sealyu/comments/337907.htmlhttp://www.aygfsteel.com/sealyu/archive/2010/11/12/337907.html#Feedback0http://www.aygfsteel.com/sealyu/comments/commentRss/337907.htmlhttp://www.aygfsteel.com/sealyu/services/trackbacks/337907.html 前面写了 Mac开发基¼‹€åQšæ‰“å¼€ä¸€ä¸ªç›®å½•çš„æ–ÒŽ³•åQŒä¸‹é¢ç‘ô¾l­ï¼Œçœ‹çœ‹å¦‚何通过½E‹åºå¾—到一个目录的内容ã€?1, 使用NSFileManager来得到这个目录的内容 NSArray * contentArray = [ [ NSFileManager defaultManage

前面写了Mac开发基¼‹€åQšæ‰“å¼€ä¸€ä¸ªç›®å½•çš„æ–ÒŽ³•åQŒä¸‹é¢ç‘ô¾l­ï¼Œçœ‹çœ‹å¦‚何通过½E‹åºå¾—到一个目录的内容ã€?/p>

1, 使用NSFileManager来得到这个目录的内容

NSArray *contentArray = [[NSFileManager defaultManager] 
contentsOfDirectoryAtURL:[[oPanel URLs] objectAtIndex:0]
//oPanel是上个帖子中的NSOpenPanel对象
includingPropertiesForKeys:[NSArray array]
options:0
error:nil];
//我们得到一个Array的NSURL

2, ½Ž€å•显½Cø™¿™ä¸ªArray中的内容

	for(id innerUrl in contentArray)
{
NSLog([innerUrl absoluteString]);
}

3, ¾l“æžœ

run
[Switching to process 3626]
Running…
2010-06-17 23:32:43.409 XML2HTML[3626:a0f] file://localhost/Users/kingmtn/Downloads/T01/T01n0001.xml
2010-06-17 23:32:43.411 XML2HTML[3626:a0f] file://localhost/Users/kingmtn/Downloads/T01/T01n0002.xml
2010-06-17 23:32:43.411 XML2HTML[3626:a0f] file://localhost/Users/kingmtn/Downloads/T01/T01n0003.xml
2010-06-17 23:32:43.411 XML2HTML[3626:a0f] file://localhost/Users/kingmtn/Downloads/T01/T01n0004.xml
2010-06-17 23:32:43.411 XML2HTML[3626:a0f] file://localhost/Users/kingmtn/Downloads/T01/T01n0005.xml
2010-06-17 23:32:43.411 XML2HTML[3626:a0f] file://localhost/Users/kingmtn/Downloads/T01/T01n0006.xml
2010-06-17 23:32:43.412 XML2HTML[3626:a0f] file://localhost/Users/kingmtn/Downloads/T01/T01n0007.xml



]]>
è‹å·žç ´è§£åŽäØ“HG522无线猫,使用iphone4上网http://www.aygfsteel.com/sealyu/archive/2010/11/05/337383.htmlsealsealFri, 05 Nov 2010 13:59:00 GMThttp://www.aygfsteel.com/sealyu/archive/2010/11/05/337383.htmlhttp://www.aygfsteel.com/sealyu/comments/337383.htmlhttp://www.aygfsteel.com/sealyu/archive/2010/11/05/337383.html#Feedback0http://www.aygfsteel.com/sealyu/comments/commentRss/337383.htmlhttp://www.aygfsteel.com/sealyu/services/trackbacks/337383.html

苏州我的eå®¶ç”¨æˆøP¼Œž®†å›¾ä¸­VPC/VCIæ”¹äØ“8/35åQŒè¿™æ ïL”¨iphone输入wifi密码后就可以直接上网äº?br />


]]>
AwakeFromNibhttp://www.aygfsteel.com/sealyu/archive/2010/10/28/336358.htmlsealsealThu, 28 Oct 2010 02:58:00 GMThttp://www.aygfsteel.com/sealyu/archive/2010/10/28/336358.htmlhttp://www.aygfsteel.com/sealyu/comments/336358.htmlhttp://www.aygfsteel.com/sealyu/archive/2010/10/28/336358.html#Feedback0http://www.aygfsteel.com/sealyu/comments/commentRss/336358.htmlhttp://www.aygfsteel.com/sealyu/services/trackbacks/336358.html After all outlets and actions are connected, the nib loader sends awakeFromNib to every object in the nib. This is where you can access outlets to set up default values or do configuration in code. Example:

- (void)awakeFromNib
{
[buttonOutlet setPeriodicDelay:2 interval:0.5];
[textFieldOutlet setStringValue:@"Hello world!"];
}


]]>
iphone çš„cydiaæº?/title><link>http://www.aygfsteel.com/sealyu/archive/2010/10/18/335414.html</link><dc:creator>seal</dc:creator><author>seal</author><pubDate>Mon, 18 Oct 2010 02:01:00 GMT</pubDate><guid>http://www.aygfsteel.com/sealyu/archive/2010/10/18/335414.html</guid><wfw:comment>http://www.aygfsteel.com/sealyu/comments/335414.html</wfw:comment><comments>http://www.aygfsteel.com/sealyu/archive/2010/10/18/335414.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/sealyu/comments/commentRss/335414.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/sealyu/services/trackbacks/335414.html</trackback:ping><description><![CDATA[<span style="color: #ff0000;"><strong>下面几个是我自己的所有ios机器上越狱必定会æ·ÕdŠ çš„Cydia源,资源丰富åQŒå½“然最重要的是免费 </strong></span><strong><br /> <a target="_blank">http://cydia.hackulo.us/</a>                                                                         大名鼎鼎的Hackuloæº?资源不多åQŒä½†éƒ½å‡ ä¹Žæ˜¯å¿…é¡»çš?我的appsyncåQŒInstallous½{‰ä¸€èˆ¬å°±åœ¨è¿™é‡Œé¢˜q›è¡Œå®‰è£… <br /> <a target="_blank">http://app.weiphone.com/cydia/</a>  (强烈推荐)                                      weiphone官方的Cydia源,更新很快åQŒèµ„源非常多 <br /> <a target="_blank"><strong><font size="6">http://apt.178.com/</font></strong></a><strong> <span style="color: #ff0000;"> (重磅推荐)</span>       </strong> <br /> <strong>appç ´è§£å¸?span style="color: #ff0000;">丛林ç‹?@Conglinlang) </span><span style="color: #000000;">çš„Cydiaæº?诠释最åˆîC½çš„中文Cydia源资源丰富且全部免费,,,更新快,速度å¿?/span> </strong><br /> <br /> <a target="_blank">http://cydia.xsellize.com/</a>                                                                        国外知名破解软äšg源,资源丰富åQŒä¸”免费(其中破解了很多bigboos中的收费™å¹ç›®) <br /> <a target="_blank">http://www.sinfuliphonerepo.com</a>                                                       国外知名破解软äšg源,资源丰富åQŒä¸”免费(其中破解了很多bigboos中的收费™å¹ç›®) <br /> <a target="_blank">http://cy.sosiphone.com/</a>                                                                       国外知名破解软äšg源,资源丰富åQŒä¸”免费(其中破解了很多bigboos中的收费™å¹ç›®) <br /> <a target="_blank">http://iphone.t gbus.com/cydia/</a> (åŽÀLމtå’Œg中间的空æ ?                                                            ç”늎©æ‰’屎的Cydia源,资源丰富åQŒå…è´šw¡¹ç›®å¤š <br /> <br /> <br /> <strong><span style="color: #ff0000;">以下几个为Cydia的自带源åQŒå¤§å®‰™œ€è¦ç‰¹åˆ«æ³¨æ„åƒä¸‡åˆ«åˆ é™¤äº?万一不小心删除的话,可以在weiphone源中扑ֈ°weiphone新源åQŒå®‰è£…对应镜像源卛_¯)åQ?/span></strong> <br /> <a target="_blank">http://apt.modmyi.com/</a>  <br /> <a target="_blank">http://apt.bigboss.us.com/repofiles/cydia/</a>  <br /> <a target="_blank">http://apt.saurik.com/</a>  <br /> <a target="_blank">http://ispaziorepository.com</a>  <br /> <a target="_blank">http://repo.smxy.org/cydia/apt/</a>  <br /> <a target="_blank">http://www.zodttd.com/repo/cydia/</a> </strong> <img src ="http://www.aygfsteel.com/sealyu/aggbug/335414.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/sealyu/" target="_blank">seal</a> 2010-10-18 10:01 <a href="http://www.aygfsteel.com/sealyu/archive/2010/10/18/335414.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Limera1n iOS 4.1&3.2.2­‘Šç‹±æ•™ç¨‹åQˆè{åQ?/title><link>http://www.aygfsteel.com/sealyu/archive/2010/10/11/334474.html</link><dc:creator>seal</dc:creator><author>seal</author><pubDate>Mon, 11 Oct 2010 12:37:00 GMT</pubDate><guid>http://www.aygfsteel.com/sealyu/archive/2010/10/11/334474.html</guid><wfw:comment>http://www.aygfsteel.com/sealyu/comments/334474.html</wfw:comment><comments>http://www.aygfsteel.com/sealyu/archive/2010/10/11/334474.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/sealyu/comments/commentRss/334474.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/sealyu/services/trackbacks/334474.html</trackback:ping><description><![CDATA[¼œžå¥‡ž®å­Geohotçš„Limera1n<a >­‘Šç‹±</a>工具现在正式攑ևºäº†ã€‚æ­¤‹Æ¡çš„Limera1n<a >­‘Šç‹±</a>ž®†å¯¹åº?a >iPhone</a>/iPod touch/iPad三款¾pÕdˆ—讑֤‡åQŒå¯<a >­‘Šç‹±</a>çš„iOS包括4.1以及3.2.2。另外即使是3.0或è€?.1的固ä»Óž¼Œä¹Ÿå¯ä»¥é€šè¿‡Limera1n˜q›è¡Œ4.1çš?a >­‘Šç‹±</a>。下面是Limera1nçš?a >­‘Šç‹±</a>教程及必™åÀL³¨æ„çš„事项åQŒä¹‹åŽå¦‚Limera1n˜q›è¡Œæ›´æ–°åQŒä¹Ÿž®†ä¼š˜q›è¡Œæ•™ç¨‹çš„æ›´æ–°ã€? <p>  <strong><font size="3"><font color="#ff0000">使用æœ?a >­‘Šç‹±</a>工具前请注意åQæœ¬å·¥å…·åªæä¾?a >­‘Šç‹±</a>而不提供解锁åQŒæœ‰é”ç‰ˆ<a >iPhone</a>用户请勿使用åQŒä»¥å…é€ æˆä¸è‰¯çš„后果。而目前最新版的Limera1n 为Beta4åQŒä¸»è¦æ›´æ–°æ”¯æŒMC型号çš?a >iPhone</a> 3GSåQˆæ–°BootromåQ‰ï¼Œä¿®å¤è‡ªèín卸蝲及其他一些BUG。另外目前Limera1n暂时不支持iPod touch 2代的<a >­‘Šç‹±</a>åQŒéœ€è¦ç­‰Geohot‹¹‹è¯•更新后才能支持。另外目前Limera1n仅支æŒ?/font><font color="#ff0000">Windowsòq›_°åQ?/font><font color="#ff0000">Mac、Linux或者其他åã^台的Limera1n需要等待更新才能支持ã€?/font></font></strong></p> <p>  <strong>下面是Limera1n<a >­‘Šç‹±</a>教程åQ?/strong></p> <p>下蝲Limera1n Beta3åQŒè¿›å…?a target="_blank"><font color="#0070af" size="4">http://limera1n.com/</font></a><span id="att_1265623">åQ?strong><font color="#0000ff">如无法进入,请借助工具或者避开‹¹è§ˆé«˜å³°æœŸè¿›å…¥ã€?/font></strong></span></p> <p>  获得Limera1nåQŒæŽ¥ç€ž®?a >iPhone</a>/iPod touch/iPad˜qžæŽ¥åˆ°ç”µè„‘,然后打开Limera1nåQŒè§ä¸‹å›¾åQ?/p> <p align="center"><a title="Limera1n iOS 4.1&3.2.2­‘Šç‹±æ•™ç¨‹" ><img alt="" src="http://resource.weiphone.com/resource/h003/h44/img201010101418050.jpg" border="0" /></a></p> <p>  接着点击make in ra1nåQŒç„¶åŽä¼šå‡ºçŽ°ä¸‹é¢˜q™ä¸ªç•Œé¢åQŒæ½C?#8220;hold home+power”</p> <p align="center"><a title="Limera1n iOS 4.1&3.2.2­‘Šç‹±æ•™ç¨‹" ><img alt="" src="http://resource.weiphone.com/resource/h003/h44/img201010101419140.jpg" border="0" /></a></p> <p>  按照提示按住<strong><font size="3">甉|ºé”?homeé”?/font></strong>不要松手åQŒç­‰å¾…一会,ž®†å‡ºçŽ°æ–°çš„æ½Cºï¼š“Relase power button”</p> <p align="center"><a title="Limera1n iOS 4.1&3.2.2­‘Šç‹±æ•™ç¨‹" ><img alt="" src="http://resource.weiphone.com/resource/h003/h44/img201010101421260.jpg" border="0" /></a></p> <p align="left">  ˜q™ä¸ªæ—¶å€™æŒ‰ç…?font size="2"><strong>提示村ּ€ç”‰|ºé”®ï¼Œä½†æ˜¯home键请保持¾l§ç®‹æŒ‰ä½çš„状æ€?/strong></font>åQŒç„¶åŽå°†ä¼šæ˜¾½C?#8220;in DFU mode...wait”åQŒè¿›å…¥äº†DFU模式åQŒè§ä¸‹å›¾åQ?/p> <p align="center"><a title="Limera1n iOS 4.1&3.2.2­‘Šç‹±æ•™ç¨‹" ><img alt="" src="http://resource.weiphone.com/resource/h003/h44/img201010101422530.jpg" border="0" /></a></p> <p align="left">  ˜q™ä¸ªæ—¶å€?a >iPhone</a>/iPod touch/iPad的屏òq•上ž®†ä¼šå‡ºçްLimera1n的标志——一滴绿色的雨滴。接着误‚€å¿ƒ½{‰å¾…一会,成功的话ž®†ä¼šå‡ºçŽ°ä»¥ä¸‹çš„ç•Œé¢ï¼š</p> <p align="center"><a title="Limera1n iOS 4.1&3.2.2­‘Šç‹±æ•™ç¨‹" ><img alt="" src="http://resource.weiphone.com/resource/h003/h44/img201010101425070.jpg" border="0" /></a></p> <p align="left">  Limera1n<a >­‘Šç‹±</a>½W¬ä¸€éƒ¨åˆ†å®Œæˆã€‚接着重启讑֤‡åQŒç„¶åŽåœ¨å±å¹•内找到Limera1n的图标点击进入ã€?/p> <p align="center"><a title="Limera1n iOS 4.1&3.2.2­‘Šç‹±æ•™ç¨‹" ><img alt="" src="http://resource.weiphone.com/resource/h003/h44/img201010101427580.png" border="0" /></a></p> <p align="left">  在Limera1n里面选择cydiaåQŒç„¶åŽå†ç‚¹å‡»å³ä¸Šè§’çš„“Install”åQŒå¼€å§‹è¿›è¡Œcydia的下载。注意!此步骤需要无¾U¿ç½‘¾lœæ”¯æŒã€?/p> <p align="center"><a title="Limera1n iOS 4.1&3.2.2­‘Šç‹±æ•™ç¨‹" ><img alt="" src="http://resource.weiphone.com/resource/h003/h44/img201010101427330.png" border="0" /></a></p> <p align="left">  国外用户可直接下载,国内用户如无法下载的åQŒè¯·è®„¡½®è®‘Ö¤‡å†…çš„VPNã€?/p> <p align="center"><a title="Limera1n iOS 4.1&3.2.2­‘Šç‹±æ•™ç¨‹" ><img alt="" src="http://resource.weiphone.com/resource/h003/h44/img201010101429230.png" border="0" /></a></p> <p align="left">  cydia下蝲完成åQŒæœ¬‹Æ¡Limera1n<a >­‘Šç‹±</a>工作完成ã€?/p> <p align="center"><a title="Limera1n iOS 4.1&3.2.2­‘Šç‹±æ•™ç¨‹" ><img alt="" src="http://resource.weiphone.com/resource/h003/h44/img201010101437470.png" border="0" /></a></p> <p align="left">  <strong><font color="#ff0000"><a >­‘Šç‹±</a>时及完成<a >­‘Šç‹±</a>后的注意事项åQ?/font></strong></p> <p align="left"><strong><font color="#ff0000">  1 <a >­‘Šç‹±</a>的时候请打开iTunesåQ?/font></strong></p> <p align="left"><strong><font color="#ff0000">  2 <a >­‘Šç‹±</a>完成后请通过</font><font color="#ff0000">cydia˜q›è¡ŒSHSH的备份。未备䆾SHSHçš„ç”¨æˆøP¼Œåœ¨Cydia的首™åµä¼šæœ‰ä¸€ä¸ªçº¢å¿ƒæ ‡å¿—,点击卛_¯å¤‡ä†¾ã€‚如已经备䆾˜q‡çš„åQŒåˆ™ä¸ä¼šå‡ºçŽ°æ­¤æ ‡å¿—ï¼Œòq¶ä¸”会在Cydia首页最上方昄¡¤º“SHSH:iOS 4.1”åQŒè¡¨½Cºæ­¤è®‘Ö¤‡å·²ç»å¤‡ä†¾˜q‡SHSHã€?/font></strong></p> <p align="left"><strong><font color="#ff0000">  3 <a >­‘Šç‹±</a>后如果limera1nå’ŒCydia图标是白色的åQŒæ— éœ€ç´§å¼ åQŒé‡å¯è®¾å¤‡å³å¯ã€?/font></strong></p> <p align="left"><font color="#ff0000"><strong>  4 <a >­‘Šç‹±</a>后的ipa破解补丁安装åQŒè¯·˜q›å…¥</strong></font></p> <p align="left"><font color="#ff0000">  <a ><strong>http://apt.weiphone.com/cydia</strong></a></font></p> <p align="left"><font color="#ff0000">  <a ><strong>http://app.weiphone.com/cydia/</strong></a></font></p> <p align="left"><font color="#ff0000">  <a ><strong>http://apt.weiphone.com/cydia/saurik</strong></a></font></p> <p align="left"><font color="#ff0000">  <a ><strong>http://apt.weiphone.com/cydia/bigboss</strong></a></font></p> <p align="left"><font color="#ff0000">  <a ><strong>http://cydia.hackulo.us</strong></a></font></p> <p align="left"><font color="#ff0000"><strong>  ½{‰æºåQŒä¸‹è½½å®‰è£…相应的ipa破解补丁ã€?/strong></font></p> <img src ="http://www.aygfsteel.com/sealyu/aggbug/334474.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/sealyu/" target="_blank">seal</a> 2010-10-11 20:37 <a href="http://www.aygfsteel.com/sealyu/archive/2010/10/11/334474.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>不越ç‹Þq”¨TinyUmbrella4.1.4备䆾iOS4.1çš„SHSHhttp://www.aygfsteel.com/sealyu/archive/2010/10/11/334472.htmlsealsealMon, 11 Oct 2010 12:14:00 GMThttp://www.aygfsteel.com/sealyu/archive/2010/10/11/334472.htmlhttp://www.aygfsteel.com/sealyu/comments/334472.htmlhttp://www.aygfsteel.com/sealyu/archive/2010/10/11/334472.html#Feedback0http://www.aygfsteel.com/sealyu/comments/commentRss/334472.htmlhttp://www.aygfsteel.com/sealyu/services/trackbacks/334472.html  ECID SHSH备䆾工具TinyUmbrella卛_ŽŸæ¥çš„Firmware UmbrellaåQŒæ˜¯ä¸€‹Æ„¡”¨æ¥ç”³è¯·ECID配对的SHSHæ–‡äšgçš„èÊYä»Óž¼Œæ”¯æŒæœªè¶Šç‹Þqš„讑֤‡ã€‚最新版4.1.4支持iOS 4.1å’ŒiPhone4。此½E‹åºéœ€è¦Java˜qè¡ŒçŽ¯å¢ƒæ”¯æŒåQŒå¦‚果没有安装,请到Java官方¾|‘站下蝲安装ã€?/p>

TinyUmbrella 4.1.4下蝲

iTunes10下蝲

Java˜qè¡ŒçŽ¯å¢ƒä¸‹è²


注意事项åQ?/font>

  1.使用TinyUmbrella之前åQŒè¯·å¸è²ç”µè„‘上的Wi-Fi SyncåQˆå¦‚果以前安装过åQ‰ã€?/p>

  2.使用本地SHSH恢复˜q‡ç¨‹ä¸­å¯èƒ½ä¼šæœ‰é”™è¯¯æ½Cºå¼¹å‡ºï¼Œä½†ä¸ç”¨æ‹…心,å›ÞZšg的确可以完成恢复åQŒå¦‚果卡在DFU或黑屏模式无法退出,则可以ä‹É用集成的Kick Device Out of RecoveryåQˆå¦‚下图åQ?/strong>按钮来退出恢复模式ã€?/p>

  3.Mac用户请将App拷备出DMG镜像再运行,否则会收到无ž®½çš„密码提示选项ã€?/p>

  4.必须安装iTunes9.0或以上版本,推荐iTunes10�/p>


  软äšg的操作非常简单:

一、备份shsh

  先将iPhone联机åQŒç‚¹å‡?strong>Save My SHSH开始备份ã€?br /> SHSHæ–‡äšg的位¾|®ä½äºŽï¼š
Windows XP     C:"Documents and Settings"用户å?.shsh            
Windows   7 C:"Users"用户å?.shsh"                          
Mac     /Users/用户å?.shsh/                              

注意åQ?br /> 1åQŒåœ¨Mac下面文äšgå¤?shsh是隐藏的åQŒè¦æƒÏx˜¾½Cºï¼Œéœ€åœ¨ç»ˆç«¯ä¸­è¾“å…¥åQšdefaults write com.apple.finder AppleShowAllFiles -bool true命ä×o后重启FinderåQ›æ¢å¤éšè—ï¼Œåˆ™å°†trueæ”¹äØ“falseåQŒé‡å¯finderã€?/p>

  2åQŒä»ŽAppleå’ŒSaurik取回的SHSH大小不同åQŒä½†æ˜¯åœ¨æ¢å¤æ—¶æ²¡æœ‰åª„响ã€?/p>

二、自建服务器恢复å›ÞZšg

  在第一步完成之后,
无需更改hostsåQ?br /> 点击右上è§?strong>Start TSS Servicer后恢复SHSH对应å›ÞZšg卛_¯ã€?/p>


几点说明åQ?/p>

  1.Save My SHSH按钮ž®±æ˜¯å¤‡ä†¾SHSH的开兟뀂连接iDevice到电脑后åQŒæ‰“å¼€TinyUmbrella后直接点å‡ÀL­¤æŒ‰é’®å›_¯å¤‡ä†¾SHSHã€?/p>

  2.Start TSS Server按钮是在恢复å›ÞZšgæ—¶ä‹É用的åQŒæŒ‰ä¸‹åŽå›_¯ä½¿ç”¨æœ¬åœ°çš„SHSHæ–‡äšg来恢复iPhoneå›ÞZšgã€?/p>

  3.Display SHSHs按钮是用来显½Cø™®¾å¤‡æ˜¯å¦æœ‰ç›¸åº”çš„SHSH可以下蝲或者ä‹É用,效果如下åQ?/p>

  4.Advanced Optionså‹ùN€‰åŽä¼šå‡ºçްECID、Device/Versionå’ŒLocation三个选项åQšç¬¬ä¸€ä¸ªECID处可以手动输入ECID码;½W¬äºŒ Device/Version用来强制选择型号和版本;½W¬ä¸‰ä¸ªLocation是选择SHSH的备份地址åQŒè¿™ä¸ªè¦é‡ç‚¹ä»‹ç»ä¸€ä¸‹ï¼Œé€‰æ‹©Apple是从è‹ÒŽžœå¤? 份、选择Cydia则是在Cydia中备份、选择Local是备份到本地。没有在本地看到SHSHæ–‡äšg的用户不用担心,默认的备份ä‹É用Cydia服务器ã€?/p>


当TinyUmbrella无法识别已经˜qžæŽ¥åˆ°ç”µè„‘çš„iPhone、iPad或者iPod touchæ—Óž¼Œž®×ƒ¸èƒ½ä¸€é”®å¤‡ä»½SHSH了,首先需è¦?a title="使用USBView来查看iPhoneçš„ECID" target="_blank">使用USBView来查看iPhoneçš„ECIDåQˆä¹Ÿå¯ä‹Éç”?a title="ECIDè¯Õd–å™? target="_blank">ECIDè¯Õd–å™?/a>或è€?a title="Auto SHSH Grabber" target="_blank">Auto SHSH GrabberåQŒé€‰æ‹©ä¸€¿Uä¹ æƒ¯çš„æ–ÒŽ³•卛_¯åQŒä¸éœ€è¦æ¯¿Uæ–¹æ³•都会)。这里我们ä‹É用最可靠的USBViewã€?

不越ç‹Þq”¨TinyUmbrella4.1.4备䆾iOS4.1çš„SHSH

首先åQŒæŒ‰ä½HOMEå’ŒPower键十¿U’左叻I¼ŒiPhone屏幕黑掉åQŒä¹‹åŽè¯»äº”ç§’åQŒä¿æŒHomeé”®æŒ‰ä½åÆˆæ‘Ö¼€PoweråQŒå½“打开的iTunes出现上图中的反映时松开所有按键ã€?br />
不越ç‹Þq”¨TinyUmbrella4.1.4备䆾iOS4.1çš„SHSH

此时åQŒåº”该有˜q™æ ·çš„æ½Cºã€?br />
不越ç‹Þq”¨TinyUmbrella4.1.4备䆾iOS4.1çš„SHSH

˜qè¡ŒUSBViewåQŒç‚¹å‡ÖM¸Šé¢çš„Optionsã€?br />
不越ç‹Þq”¨TinyUmbrella4.1.4备䆾iOS4.1çš„SHSH

按图中选中Config Description�br />
不越ç‹Þq”¨TinyUmbrella4.1.4备䆾iOS4.1çš„SHSH

之后按F5åˆäh–°åQŒå¯ä»¥çœ‹åˆîC¸€ä¸ªå¤„于DFU模式的iPhoneã€?br />
不越ç‹Þq”¨TinyUmbrella4.1.4备䆾iOS4.1çš„SHSH

˜q™æ—¶åQŒåœ¨å³ä¾§å¯ä»¥æ‰‘Öˆ°å¯¹åº”çš„ECIDå’ŒiBoot版本ã€?br />
不越ç‹Þq”¨TinyUmbrella4.1.4备䆾iOS4.1çš„SHSH

打开TinyUmbrellaòq¶å°†ECIDå¡«å…¥Advanced Options中的ECID框内ã€?br />

随后åQŒæ²¡æœ‰è¶Šç‹Þp¿‡çš„iPhone需要把Request From一™åšw€‰æ‹©ä¸ºAppleåQŒç„¶åŽç‚¹å‡»Save My SHSH按键开始保存相应版本的SHSH。(­‘Šç‹±òq¶å¤‡ä»½è¿‡4.1SHSH的用户可以直接选择Cydia来保存SHSHåQ‰ã€?br />
不越ç‹Þq”¨TinyUmbrella4.1.4备䆾iOS4.1çš„SHSH

恢复å›ÞZšg时打开TSS Server选项åQŒè¿™æ—¶ä¼šè‡ªåŠ¨æ€æŽ‰iTunesåQŒé‡æ–°æ‰“开后即可正常恢复ã€?/p>

]]>
Helper class for showing records with pagination for iPhone sdk apphttp://www.aygfsteel.com/sealyu/archive/2010/10/08/334004.htmlsealsealFri, 08 Oct 2010 13:30:00 GMThttp://www.aygfsteel.com/sealyu/archive/2010/10/08/334004.htmlhttp://www.aygfsteel.com/sealyu/comments/334004.htmlhttp://www.aygfsteel.com/sealyu/archive/2010/10/08/334004.html#Feedback0http://www.aygfsteel.com/sealyu/comments/commentRss/334004.htmlhttp://www.aygfsteel.com/sealyu/services/trackbacks/334004.htmlWe often need to add social features in our iPhone apps. Adding features like commenting, shouts etc are very common. These type of data are usually shown
with pagination with buttons like next, previous etc.

To reduce the overhead of creating this functionality again and again we may encapsulate the common functions in a class. So did I for my applications.

I have created a class named PaginationAgent. After loading records it calls related methods of its delegate which should implement protocol PaginationAgentDeleagte.

Additionally two php files are needed. One to return the total number of records and another one is to fetch the page data. They must be named respectively as

  • get_total_number_of_records.php
  • get_records.php

Lets see an example.

First, I have created a simple view based project “Pagination” and designed the view as u see:

Create a similar view using Interface Builder

1. Added a button to show previous page data

2. One button to reload the data.

3. Another to show data on next page.

4. Added a UITable which will show the result.

In PaginationViewController.h, imported PaginationAgent.h file and declared:

  1. PaginationAgent* objPagination;  

Now lets see how to initialize it. In the viewDidLoad method I initialized this like this:

  1. objPagination = [[PaginationAgent alloc] init];  
  2. objPagination.delegate = self;  
  3. objPagination.remoteApiBasePath = @"http://your.server/path/to/folder";  

remoteApiBasePath must be set to the location where the server side php files are placed.
No trailing slash.

PaginationAgentDelegate protocol declares the following functions to be overridden by the Delegate:

  1. /** 
  2. * This method is called when the busystate is changed. 
  3. * You can do something like disable/enable the buttons, grayout etc 
  4. * based on the isBusy value. 
  5. */  
  6. -(void)paginationAgent:(PaginationAgent*)agent updateBusyMode:(BOOL)isBusy;  
  7.   
  8. /** 
  9. * Called when total data count is received if shouldReloadAtFirstPage is set NO. 
  10. */  
  11. -(void)paginationAgent:(PaginationAgent*)agent totalDataCountReceived:(int)dataCount;  
  12.   
  13. /** 
  14. * Called when page data is loaded. You may set your table dataSource here and realod 
  15. * reload the table. 
  16. */  
  17. -(void)paginationAgent:(PaginationAgent*)agent pageDataReceived:(NSArray*)data;  
  18.   
  19. /** 
  20. * Called if server sends malformed data 
  21. */  
  22. -(void)paginationAgent:(PaginationAgent*)agent onPaginationServerError:(NSString*)message;  
  23.   
  24. /** 
  25. * Called if connection failed. It may occur due to poor or no internet connectivity 
  26. */  
  27. -(void)paginationAgent:(PaginationAgent*)agent onPaginationConnectionError:(NSString*)message;  

The php files must return data in json format and must use the format as used:

  1. 1,'message'=>'Success','data'=>33);  
  2.     echo json_encode($data);  
  3.   
  4. ?>  
  1. ...  
  2. ...  
  3. $data = array('success'=>1,'message'=>'Got data','data'=>$rows);  
  4.   
  5. echo json_encode($data);  

See the attached project for details. The php files are inside the folder “PHPFILES”.

Pagination.zip



]]>
How To Integrate iAd into Your iPhone Apphttp://www.aygfsteel.com/sealyu/archive/2010/10/08/333984.htmlsealsealFri, 08 Oct 2010 08:35:00 GMThttp://www.aygfsteel.com/sealyu/archive/2010/10/08/333984.htmlhttp://www.aygfsteel.com/sealyu/comments/333984.htmlhttp://www.aygfsteel.com/sealyu/archive/2010/10/08/333984.html#Feedback0http://www.aygfsteel.com/sealyu/comments/commentRss/333984.htmlhttp://www.aygfsteel.com/sealyu/services/trackbacks/333984.htmlHow To Integrate iAd into Your iPhone App

1) Integrate iAd 2) ??? 3) PROFIT!

1) Integrate iAd 2) ??? 3) PROFIT!

With the iOs SDK 4 now public and the advent of iAds just a few days away, I thought we’d celebrate with a tutorial on how to integrate iAd into your iPhone app!

In this tutorial, not only will we show you how to get started with iAd, but we’ll also show you how to deal with some complex issues you may run into along the way such as:

  • Supporting both Portrait and Landscape ads in the same app
  • Integrating into a Universal app
  • Maintaining backwards compatibility with iOs 3.0
  • What to do if you are using a UITableViewController!

We’re actually going to start with where we left off in the How To Port an iPhone Application to the iPad and use the universal app we developed in that tutorial in the starting point.

So grab a copy if you haven’t already, and let’s get to adding some iAds!

Base SDK vs. Deployment Target

The first step to use iAd is to make sure our project has the right Base SDK and iPhone OS Deployment Target selected.

For those of you confused about the difference between the Base SDK and Deployment Target (like I was for quite some time!), here’s what they mean:

  • The Base SDK is the version of the SDK you are linking against. Your app can use any classes or functions available in the version of the SDK you choose here – as long as they are available on the actual device the code runs on.
  • The Deployment Target is the earliest possible version of the SDK your code can run on. This can be an earlier version than the Base SDK – in fact you often want to set it to be earlier to ensure that as many different versions of the OS can run your code as possible!

The tricky bit is what happens when you want to use a class, function, or framework available in one version of the OS if it’s available, but still work on the old version of the OS if it isn’t. We already did some of this in How To Port an iPhone Application to the iPad, and we’ll do even more in this tutorial!

For this tutorial, we want to set things up so that our code can use stuff available in iOS 4.0 (such as iAd), but still run on as many devices as reasonable (3.0+).

So first let’s set iOs 4.0 as the base SDK. To do this, expand the Targets directory, right click on PortMe, and choose “Get Info”. Click the Build tab, make sure “All Configurations” is selected, navigate to Architectures\Base SDK, and change the value to iPhone Device 4.0.

Screenshot of Setting Base SDK

Then, let’s set iPhone OS 3.0 as the iPhone OS Deployment Target. To do this, still in the Target Build tab, navigate to Deployment\iPhone OS Deployment Target, and change the value to iPhone OS 3.0.

Screenshot of setting Deployment Target

You should now be able to compile and run your app (use the iPhone simulator), and try it out on an iPhone 4 simulator. Once you run your code, in the simulator choose Hardware\Device\iPhone OS 4 and re-run your app. The simulator window will look a little different, and say iPhone 4 in the toolbar, so you’ll know it’s working!

Screenshot of PortMe on iOS4

Linking Against the iAd Framework

The next thing we need to do is add the iAd framework to the project. You can do this by right clicking on Frameworks, choosing “Add\Existing Frameworks…”, and choosing “iAd.framework”.

The problem is, if that is all we do our code will break on older devices that don’t have the iAd framework.

You can verify this by trying to run your code in the iPad Simulator 3.2 – boom! The app will crash on startup and you’ll see the following error log:

dyld: Library not loaded: /System/Library/Frameworks/iAd.framework/iAd
Referenced from: /Users/rwenderlich/Library/Application Support/
iPhone Simulator/3.2/Applications/
3ACB1BDA-26F6-43A6-84EA-9FB637B8CDCD/PortMe.app/PortMe
Reason: image not found

To fix this, we need to weak link against the iAd framework. Expand the Targets directory, right click on PortMe, and choose “Get Info”. Click the Build tab, make sure “All Configurations” is selected, and navigate to Linking\Other Linker Flags. Double click on that entry, click the “+” button, and type “-weak_framework iAd”.

Click OK, and then try your app on the iPad simulator again and viola – it should work!

Preparing our XIB

In this tutorial, we’re going to integrate iAd into both the PortMeGameListController and the PortMeGameDetailsController. However, the integration is a bit easier in the PortMeGameDetailsController because it is a subclass of UIViewController, so we’re going to start there first.

Open up PortMeGameDetailsController.xib. You’ll see that all of the controls are children of a single view:

Details View Controller Settings - Before

What we’re going to need to do with iAd is scroll an ad view onto the screen when an ad is available, and shrink the rest of the content to fill the remaining space. As currently designed, this isn’t that easy because all of the controls are direct children of the root view. But there’s an easy way to fix it – we’ll simply move the controls into a subview instead!

The easiest way to do this is to drag another view from the library into the XIB, and change its size to be the same as the existing view’s size (320×416). Then drag the existing view as a subview of the new view. When you’re done, it should look like the following:

Details View Controller Settings - After

Then, control-drag from the File’s Owner to the new view (which is now the root view) to connect it to the view outlet. Save your XIB, and run the project and verify that everything still works OK with the details view (in particularly that orientation resizing works correctly). If all works well, we’re one step closer to integrating iAd!

Simple iAd Integration

Ok, now let’s get to the fun part – integrating iAd!

First, make the following changes to PortMeGameDetailsController:

// In the import section
            #import "iAd/ADBannerView.h"
             
            // Modify the PortMeGameDetailsController interface
            @interface PortMeGameDetailsController : UIViewController
            <GameSelectionDelegate, UISplitViewControllerDelegate, ADBannerViewDelegate> {
             
            // Inside the PortMeGameDetailsController interface
            UIView *_contentView;
            id _adBannerView;
            BOOL _adBannerViewIsVisible;
             
            // After the interface
            @property (nonatomic, retain) IBOutlet UIView *contentView;
            @property (nonatomic, retain) id adBannerView;
            @property (nonatomic) BOOL adBannerViewIsVisible;

We first include the iAd headers and mark the view controller as implementing the ADBannerViewDelegate. This way, we can receive events as ads become available or not.

We then declare a property to keep track of the content view that contains all of the controls (basically the inner UIView). We also declare a variable to keep track of our iAd banner view, and whether or not it’s currently visible.

Note that we declare the iAd banner view as an id variable rather than as a ADBannerView. This is because we want to ensure backwards compatibility all the way to OS 3.0, and the ADBannerView class is only available on 4.0+, so we need to weak link against it.

Before we forget, let’s hook up our content view to the new outlet we just made. Make sure you save PortMeGameDetailsController.h, go back to PortMeGameDetailsController.xib, control-drag from the File’s Owner to the inner (second) UIView, and connect it to the contentView outlet.

Then switch over to PortMeGameDetailsController.m and make the following changes:

// In the synthesize section
            @synthesize contentView = _contentView;
            @synthesize adBannerView = _adBannerView;
            @synthesize adBannerViewIsVisible = _adBannerViewIsVisible;
             
            // In the dealloc section
            self.contentView = nil;
            self.adBannerView = nil;

Next, we’re going to add the meat of the code. But there’s a lot of it – so let’s break it down into 6 steps.

1) Add helper functions to get height of iAd banner

- (int)getBannerHeight:(UIDeviceOrientation)orientation {
            if (UIInterfaceOrientationIsLandscape(orientation)) {
            return 32;
            } else {
            return 50;
            }
            }
             
            - (int)getBannerHeight {
            return [self getBannerHeight:[UIDevice currentDevice].orientation];
            }

There are several places in the rest of the code where we’re going to want to know how large the banner view should be given a particular orientation. Currently iAds have two possible sizes: 320×50 for landscape, or 480×32 for portrait. So we simply retrieve the proper height based on the passed in orientation.

2) Add helper function to create the iAd view

- (void)createAdBannerView {
            Class classAdBannerView = NSClassFromString(@"ADBannerView");
            if (classAdBannerView != nil) {
            self.adBannerView = [[[classAdBannerView alloc]
            initWithFrame:CGRectZero] autorelease];
            [_adBannerView setRequiredContentSizeIdentifiers:[NSSet setWithObjects:
            ADBannerContentSizeIdentifier320x50,
            ADBannerContentSizeIdentifier480x32, nil]];
            if (UIInterfaceOrientationIsLandscape([UIDevice currentDevice].orientation)) {
            [_adBannerView setCurrentContentSizeIdentifier:
            ADBannerContentSizeIdentifier480x32];
            } else {
            [_adBannerView setCurrentContentSizeIdentifier:
            ADBannerContentSizeIdentifier320x50];
            }
            [_adBannerView setFrame:CGRectOffset([_adBannerView frame], 0,
            -[self getBannerHeight])];
            [_adBannerView setDelegate:self];
             
            [self.view addSubview:_adBannerView];
            }
            }

This helper function creates an ADBannerView in a manner that is safe to use across multiple OS versions. It uses weak linking and NSClassFromString to check if the ADBannerView class is available – if it is not, the method will return nil and the function will bail.

However, if it is available it creates an instance of the class. It then uses the setRequiredContentSizeIdentifiers to specify what kind of ads this app needs. For our case, our app supports both portrait and landscape modes so it needs both ad options.

It then calls setCurrentContentSizeIdentifier to tell iAd which ad it should display. We simply choose the correct one by looking at the current orientation.

Next, we need to set the frame for the iAd. Note there’s some funky business here – we actually set the frame of the view to be offscreen! This is because we don’t know if an ad is available yet, and we don’t want to display the view until we know one is.

We set our view controller as the delegate so that we can receive notice about iAds being available or not. Then finally we ad the new iAd banner view as a subview of our view!

Note something subtle about the above – we always use message passing syntax rather than dot notation (i.e. [_adBannerView setRequiredContentSizeIdentifiers:...] instead of _adBannerView.requiredContentSizeIdentifiers = …). This is again to make sure everything runs fine on OS 3.0+.

3) Add function to size views correctly

- (void)fixupAdView:(UIInterfaceOrientation)toInterfaceOrientation {
            if (_adBannerView != nil) {
            if (UIInterfaceOrientationIsLandscape(toInterfaceOrientation)) {
            [_adBannerView setCurrentContentSizeIdentifier:
            ADBannerContentSizeIdentifier480x32];
            } else {
            [_adBannerView setCurrentContentSizeIdentifier:
            ADBannerContentSizeIdentifier320x50];
            }
            [UIView beginAnimations:@"fixupViews" context:nil];
            if (_adBannerViewIsVisible) {
            CGRect adBannerViewFrame = [_adBannerView frame];
            adBannerViewFrame.origin.x = 0;
            adBannerViewFrame.origin.y = 0;
            [_adBannerView setFrame:adBannerViewFrame];
            CGRect contentViewFrame = _contentView.frame;
            contentViewFrame.origin.y =
            [self getBannerHeight:toInterfaceOrientation];
            contentViewFrame.size.height = self.view.frame.size.height -
            [self getBannerHeight:toInterfaceOrientation];
            _contentView.frame = contentViewFrame;
            } else {
            CGRect adBannerViewFrame = [_adBannerView frame];
            adBannerViewFrame.origin.x = 0;
            adBannerViewFrame.origin.y =
            -[self getBannerHeight:toInterfaceOrientation];
            [_adBannerView setFrame:adBannerViewFrame];
            CGRect contentViewFrame = _contentView.frame;
            contentViewFrame.origin.y = 0;
            contentViewFrame.size.height = self.view.frame.size.height;
            _contentView.frame = contentViewFrame;
            }
            [UIView commitAnimations];
            }
            }

This is a helper function we can call to make sure our views are in the right position. If ads are available, we want the ad banner view to be at the top of the screen and the content view shrunk a bit to fill the rest of the area. If ads are not available, we want the ad banner view offscreen and the content view as large as the entire view here.

And that’s exactly what the above function does. It looks long, but is fairly simple and self-explanatory. Note that we wrap the resizing code in an animation block to make things look awesome.

4) Call createAdView in viewDidLoad

- (void)viewDidLoad {
            [self createAdBannerView];
            }

We want to create our ad view as soon as our view is loaded, even if we aren’t ready to display it quite yet.

5) Call fixupAdView in viewWillAppear and willRotateToInterfaceOrientation

- (void) viewWillAppear:(BOOL)animated {
            [self refresh];
            [self fixupAdView:[UIDevice currentDevice].orientation];
            }
             
            - (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
            [self fixupAdView:toInterfaceOrientation];
            }

We need to fix up our ad view in viewWillAppear, because the device may have changed orientations in the time between when our view was visible last and now. And we obviously need to change it upon rotation as well!

6) Implement ADBannerViewDelegate

#pragma mark ADBannerViewDelegate
             
            - (void)bannerViewDidLoadAd:(ADBannerView *)banner {
            if (!_adBannerViewIsVisible) {
            _adBannerViewIsVisible = YES;
            [self fixupAdView:[UIDevice currentDevice].orientation];
            }
            }
             
            - (void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error
            {
            if (_adBannerViewIsVisible)
            {
            _adBannerViewIsVisible = NO;
            [self fixupAdView:[UIDevice currentDevice].orientation];
            }
            }

Now that we have our helper functions, implementing the ADBannerViewDelegate methods are quite simple. We simply toggle whether the ad banner view should be visible or not, and call fixupAdView.

Done!

And that’s it! Compile and run your project, and you should see ads appear correctly in both portrait and landscape mode.

iAd in List View - Portrait Mode

iAd in List View - Landscape Mode

And best yet – if you run the code on an iPad or iPhone 3.0 device it will work just fine as well, but without ads!

UITableView integration

Well that worked great for our details controller, but we want it in our list controller too!

The problem is our list controller is a UITableViewController. Unfortunately, it seems like the best way to deal with this situation is to convert your UITableViewController to a normal UIViewController and then proceed similarly to the way we did above. So here are all of the gory steps:

1) Create a XIB for PortMeGameListController

Go to File\New File, choose User Interface and View XIB, make sure Product is iPhone, and click Next. Name the XIB PortMeGameListController.xib and click Finish.

Open up the XIB, click on the File’s Owner, and in the fourth tab of the Attributes Inspector change the class to PortMeGameListController.

Then drag a UIView into the current UIView (so there are 2, just like we did before), and add a UITableView to the inner view. When you’re done it should look like this:

XIB settings for PortMe's List View Controller

2) Make some changes to PortMeGameListController

Inside PortMeGameListController.h:

// Change the interface declaration
            @interface PortMeGameListController : UIViewController <UITableViewDelegate, UITableViewDataSource> {
             
            // Add inside class
            UITableView *_tableView;
            UIView *_contentView;
             
            // Add after class
            @property (nonatomic, retain) IBOutlet UITableView *tableView;
            @property (nonatomic, retain) IBOutlet UIView *contentView;

Inside PortMeGameListController.m:

// In synthesize section
            @synthesize tableView = _tableView;
            @synthesize contentView = _contentView;
             
            // In dealloc section
            self.tableView = nil;
            self.contentView = nil;

Don’t forget to save the files!

3) Hook up outlets

Now go back to PortMeGameListController.xib and connect the first view to the view outlet, the second to the contentView outlet, and the third to the tableView outlet.

Also control-drag from the tableView back to the File’s Owner and set it as the delegate and datasource.

4) Set the NIB name for PortMeGameListController in MainWindow

Open MainWindow.xib and MainWindow-iPad.xib, expand the Navigation Controller, select “Port Me Game List Controller”, and change the nib name to PortMeGameListController.

5) Compile and test to make sure everything works as usual

At this point, compile and run your code and make sure everything works as it usually does – but now you’re using a UIViewController rather than a TableViewController, and you have a XIB laid out in a nice way to use iAds!

6) Follow the steps from the previous section

Now you’re exactly where we were in the previous section with a view controller – so follow the same steps to integrate in this view!

Done!

If all goes well, you should be able to compile and run your project and see advertisements at the top of your table view!

iAd in Table View - Portrait Mode

iAd in Table View - Landscape Mode

Where To Go Now?

Here is a sample project with all of the code we’ve developed in the above tutorial.

Now you should know how to integrate iAds into your projects – no matter what OSs you wish to support for your app! I’d love to hear your experiences with iAds and how well they are working (or not) for your app!



]]>
iPhone讄¡½®è§†å›¾èƒŒæ™¯å›„¡‰‡çš„æ–¹æ³?è½?http://www.aygfsteel.com/sealyu/archive/2010/10/08/333982.htmlsealsealFri, 08 Oct 2010 08:04:00 GMThttp://www.aygfsteel.com/sealyu/archive/2010/10/08/333982.htmlhttp://www.aygfsteel.com/sealyu/comments/333982.htmlhttp://www.aygfsteel.com/sealyu/archive/2010/10/08/333982.html#Feedback0http://www.aygfsteel.com/sealyu/comments/commentRss/333982.htmlhttp://www.aygfsteel.com/sealyu/services/trackbacks/333982.html
Objective-c代码
  1. - (void)setBackgroundImage {  
  2.     NSLog(@"setting bg image");  
  3.     UIImageView *customBackground = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"background.jpg"]];  
  4.     self.background = customBackground;  
  5.     [customBackground release];  
  6.       
  7.     [self addSubview:background];  
  8.     NSLog(@"Added background subview %@", background);  
  9.     [self sendSubviewToBack:background];  
  10. }  


æ–ÒŽ³•二,Cook Book中提到的æ–ÒŽ³•

Objective-c代码
  1. - (void)loadView {  
  2.       
  3.     UIImageView *contentView = [[UIImageView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];  
  4.     [contentView setImage:[UIImage imageNamed:@"Default.png"]];  
  5.     [contentView setUserInteractionEnabled:YES];  
  6.     self.view = contentView;  
  7.     [contentView release];  
  8. }  


æ–ÒŽ³•三,lvyile¾|‘友用的一个小技巧,uiView是UIView的实例,而不是UIImageView

Objective-c代码
  1. uiView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"Default.png"]]; 


]]>
How To Make Ultra-Slick Gradient UITableView Cellshttp://www.aygfsteel.com/sealyu/archive/2010/10/08/333958.htmlsealsealFri, 08 Oct 2010 03:02:00 GMThttp://www.aygfsteel.com/sealyu/archive/2010/10/08/333958.htmlhttp://www.aygfsteel.com/sealyu/comments/333958.htmlhttp://www.aygfsteel.com/sealyu/archive/2010/10/08/333958.html#Feedback0http://www.aygfsteel.com/sealyu/comments/commentRss/333958.htmlhttp://www.aygfsteel.com/sealyu/services/trackbacks/333958.htmlEditor’s Note: You’ve seen the slick supercool gradient UITableView backgrounds, and this is how to make them quick and easy.  Thanks to Brett Romero of Cygen for this tutorial, ManiacDev.Com’s first submitted tutorial.  If you’ve created a quality, original tutorial that you think iPhone developers might want to read about please e-mail webmaster@maniacdev.com.
- Johann Dowa, ManiacDev.Com
 
This demonstration provides an example of how to spice up your UITableView rows for a more polished look. In addition to seeing how easy it can be to design a nice graphic for your iPhone app, you get a start to finish implementation.

This video was embedded using the YouTuber plugin by Roy Tanck. Adobe Flash Player is required to view the video.
The finished product is shown below.

 

Rather than sticking with stock components included in Interface Builder, this demonstration shows a simple technique that gives your app a more professional look. As a developer, it can be difficult to create nice looking graphics for your app. Hiring a designer can quickly exceed the budget. However, creating some nice looking graphics is certainly achievable as a beginning designer. In addition to picking up some new great skills, a polished off UI can lend more creditability to your app and provide an overall better user experience.

In the demo, Photoshop Elements is used, which is 80 bucks at adobe.com with a mail-in rebate. To get started, create a new image with these values:

  • Width: 80 pixels
  • Height: 40 pixels
  • Background Contents: Transparent

Select a foreground color from the toolbar, as shown below:

 

 

Now select the gradient button, as shown below:

 

 

With the gradient selected, swipe from bottom to top on your image. This should produce a gradient color. Now choose File and “Save for Web”. You’ve just created the image we’ll use in our tableview. Let’s switch over to Xcode and implement the image.

In Xcode, we start by creating a navigation based application.

Once the application has been created, add the newly created image by right clicking the Resources folder then “Add” and “Existing Files”, as shown below:

 

 

 

 

The following code snippet creates two views. Both are then added to the cell’s view. Because the label, which is a view, is added as the last view, we need to ensure its background is transparent (clearColor). Otherwise, it will cover part or all (depending on the size we set) of our background image. Thinking about what this stack of layers will look like, below is a screenshot of the same scenario in Interface Builder:

 

 

From the screenshot, you can see the cell’s view owns the imageview and label. Although closer to the bottom, the label is actually top most to the user, hence the reason we need its background to clear.

Let’s take a look at the implementation in Xcode, which is all done in the UITableView delegate method cellForRowAtIndexPath:.

UIImage *image = [UIImage imageNamed:@"gradientcolor.png"];
UIImageView *imageView = [[UIImageView alloc] initWithImage:image];
imageView.contentMode = UIViewContentModeScaleToFill;
cell.backgroundView = imageView;
[imageView release];
UILabel *label = [[UILabel alloc] init];
label.text = @"testing colors";
label.frame = cell.bounds;
label.backgroundColor = [UIColor clearColor];
label.textAlignment = UITextAlignmentCenter;
[cell addSubview:label];
return cell;

In the above snippet, we create an image object using the image we added to our app bundle. Next, we create a UIImageView object with the newly created image. The image view will be assigned to our cell’s background view. The backgroundView will retain an instance of the imageView. Therefore, we release our instance, as follows:

[imageView release];

If we had not released our instance, we’d have two instances of the imageView in memory and thus a memory leak. Moving on down in the code, we create an instance of a label. We set the label’s size to cover the entire cell. The label’s background is set to clear or transparent so it doesn’t hide the cell’s background image. Our assigned text is centered and finally, we add the label to the cell’s view, making it the top most view in the cell.



]]>
Changing UITableView widthhttp://www.aygfsteel.com/sealyu/archive/2010/10/08/333955.htmlsealsealFri, 08 Oct 2010 02:40:00 GMThttp://www.aygfsteel.com/sealyu/archive/2010/10/08/333955.htmlhttp://www.aygfsteel.com/sealyu/comments/333955.htmlhttp://www.aygfsteel.com/sealyu/archive/2010/10/08/333955.html#Feedback0http://www.aygfsteel.com/sealyu/comments/commentRss/333955.htmlhttp://www.aygfsteel.com/sealyu/services/trackbacks/333955.htmlI’m back to programming and currently developing application for iPad. I needed something, what looked like a simplest thing – UITableView taking a portion of screen and SplitViewController wasn’t attractive option. To my surprise non of the obvious to me solutions worked until I’ve tried not-so-elegant reallocating of tableView.

So, in myTableViewController I created custom init function:

- (id) initWithFrame:(CGRect)frm {
if ((self = [super initWithStyle: UITableViewStylePlain])){
self.tableView = [[UITableView alloc] initWithFrame:frm style:UITableViewStylePlain];
}
return self;
}

Obviously, you can use default or your own init function or avoid passing frame argument and hardcode dimensions right here, but the magical line is:

self.tableView = [[UITableView alloc] initWithFrame:CGRectMake(x, y, width, height) style:UITableViewStylePlain];

Well, at least it worked for me.



]]>
iPhone Programming: Set UITableView Accessory Arrow Stylehttp://www.aygfsteel.com/sealyu/archive/2010/10/07/333915.htmlsealsealThu, 07 Oct 2010 12:21:00 GMThttp://www.aygfsteel.com/sealyu/archive/2010/10/07/333915.htmlhttp://www.aygfsteel.com/sealyu/comments/333915.htmlhttp://www.aygfsteel.com/sealyu/archive/2010/10/07/333915.html#Feedback0http://www.aygfsteel.com/sealyu/comments/commentRss/333915.htmlhttp://www.aygfsteel.com/sealyu/services/trackbacks/333915.htmlThe iPhone SDK provides an easy-to-code standard for creating consistent user interfaces. The UITableView class is used in many iPhone applications. Most applications that present information to you in rows that you can tap to slide a new page over to see details use a UITableView to do the magic. Once you have a UITableView setup, you can easily add the little accessory arrow icons to the right side of the table cells by following the steps in this Tech-Recipe.


At this point, you need to have a working UITableView-based application. If you aren’t at this point, you’ll need to take a few steps back and check with the official Apple iPhone SDK documentation.

The simplest case is adding an accessory icon to the right of all cells in the table. To do this, edit the source file of the table view you want to change and add the following method:

- (UITableViewCellAccessoryType)tableView:(UITableView *)tv accessoryTypeForRowWithIndexPath:(NSIndexPath *)indexPath
{
   return UITableViewCellAccessoryDetailDisclosureButton;
}

Yeah, that’s a keyboard-full, but it’s not that bad. Because your table view class is the delegate of your actual table view, implementing this method of the UITableViewController class will automatically affect the cells in your table. No other changes are needed to make this work. Very cool.

If you don’t want to show the accessory image for every cell in the table, you’ll need to implement some logic in this method that takes the NSIndexPath parameter (which tells you which row in which section is being asked about) and responds appropriately.

There are three standard accessory images that can be used by this method. Each image is shown below with the matching UITableViewCellAccessoryType (the example uses shows a Disclosure indicator image because it returns UITableViewCellAccessoryDisclosureIndicator.

Disclosure indicator

UITableViewCellAccessoryDisclosureIndicator
Used to indicate that tapping the cell will slide in a new table view one level down in the hierarchy.


Detail disclosure button

UITableViewCellAccessoryDetailDisclosureButton
This button indicates that tapping the cell will reveal a detail view of that item.


Checkmark

UITableViewCellAccessoryCheckmark
Indicates that a row has been selected by the user.


Nothing

UITableViewCellAccessoryNone
This is the default value for the cell accessory indicating that no accessory should be shown.

This isn’t a brain surgery level Tech-Recipe and this information is, of course, covered in the official documentation, but I keep forgetting the method name and knew it would be easier to lookup here than in the docs. I hope someone else finds it helpful, too.



]]>
Easy custom UITableView drawinghttp://www.aygfsteel.com/sealyu/archive/2010/10/07/333863.htmlsealsealThu, 07 Oct 2010 04:35:00 GMThttp://www.aygfsteel.com/sealyu/archive/2010/10/07/333863.htmlhttp://www.aygfsteel.com/sealyu/comments/333863.htmlhttp://www.aygfsteel.com/sealyu/archive/2010/10/07/333863.html#Feedback0http://www.aygfsteel.com/sealyu/comments/commentRss/333863.htmlhttp://www.aygfsteel.com/sealyu/services/trackbacks/333863.html

It is really easy to customize your UITableViews. I'll show you how to completely customize the appearance of UITableViews without overriding or subclassing and without the need for any tricky hackery.

Make my table pretty

The core of most iPhone applications is the UITableView. To make your iPhone application stand out, the simplest way is to make your UITableView look good.

Customizing your UITableView can be really easy. You don't need custom drawing code. You don't need subclasses of anything. Cocoa Touch provides all the drawing capability you need, all you have to do is use the right classes in the right ways and provide the layout.

The sample application

The approach I'll show you will turn the table on the left into the table on the right:

customtableview.png

Left: a default UITableView with three rows. Right: the same table view after customization.

How to fail at UITableView customizing

Coming from Mac OS X made it harder for me �UITableView needs to be customized in a very particular way and structurally, it is very different to Mac OS X's NSTableView and NSCell drawing.

The following are all really bad ways to customize a table (even though you can make it work):

  • Subclassing UITableView to customize drawing
  • Subclassing UITableViewCell to customize drawing
  • Creating your own array of UITableViewCells and returning these instead of using dequeueReusableCellWithIdentifier:

About the second point: it is okay to customize UITableViewCell �but you shouldn't really use it for drawing. The UITableViewCell class is more of a controller class �it handles behaviors and layout, not drawing. You can customize UITableViewCell to load a specific contentView (and do the custom drawing there).

That last point (that you should always use dequeueReusableCellWithIdentifier:) is only peripherally related to drawing but it will significantly slow your drawing down if you avoid the normal cell queuing architecture.

How to succeed at UITableView customizing

There are only a few points to understand related to table drawing.

First: the UITableView does not itself draw anything except the background. To customize the background of a UITableView, all you need to do is set its backgroundColor to [UIColor clearColor] and you can draw your own background in a view behind the UITableView.

Second: The tableHeaderView (and the table footer and section headers and footers) need not be just a title. You can insert your own view, with its own subviews in the table header, giving layout and custom drawing freedom.

Third: UITableViewCell is composed of 5 different subviews. Customizing the right subview is the secret to good UITableViewCell drawing. The subviews are:

  1. backgroundView �the entire background of the row (including what looks like the UITableView's background in UITableViewStyleGrouped style tables.
  2. selectedBackgroundView �replaces the backgroundView when the row is selected.
  3. image �a customizable image (not actually a subview) at the left of the cell.
  4. accessoryView �a customizable view at the right of the cell.
  5. contentView �a customizable view between the image and the accessoryView (technically, it extends behind the image).

You can customize any of these (except image which must be a UIImage) using your own custom drawn views.

However, since the pixel size of the table never changes, it is often easiest just to use UIImageViews for each of them. Then you can take highly complex views drawn in separate programs, cut them into the 5 necessary pieces and let the automatic caching of UIImage's named image cache manage your memory for you.

There is an argument against drawing your views in code and that is that the iPhone's drawing is not nearly as fast as Mac OS X. Operations like gradients and multiple overlapped components can really tax the iPhone.

Custom drawing code is a good choice for simple and flat colour drawing. In most other cases �as in this post �I recommend you use UIImageView to draw your views in a table.

Implementation

With all custom drawing handled by UIImageView, that still leaves some work to do. You must handle all layout and configuring of views.

Configuration of the UITableView and layout of the table header

As an example of what that means, have a look at the viewDidLoad method for this post:

- (void)viewDidLoad
{
//
// Change the properties of the imageView and tableView (these could be set
// in interface builder instead).
//
tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
tableView.rowHeight = 100;
tableView.backgroundColor = [UIColor clearColor];
imageView.image = [UIImage imageNamed:@"gradientBackground.png"];
//
// Create a header view. Wrap it in a container to allow us to position
// it better.
//
UIView *containerView =
[[[UIView alloc]
initWithFrame:CGRectMake(0, 0, 300, 60)]
autorelease];
UILabel *headerLabel =
[[[UILabel alloc]
initWithFrame:CGRectMake(10, 20, 300, 40)]
autorelease];
headerLabel.text = NSLocalizedString(@"Header for the table", @"");
headerLabel.textColor = [UIColor whiteColor];
headerLabel.shadowColor = [UIColor blackColor];
headerLabel.shadowOffset = CGSizeMake(0, 1);
headerLabel.font = [UIFont boldSystemFontOfSize:22];
headerLabel.backgroundColor = [UIColor clearColor];
[containerView addSubview:headerLabel];
self.tableView.tableHeaderView = containerView;
}

This method handles the configuration of the tableView (setting the backgroundColor, rowHeight and sets an image behind the table) but also creates its own layout for the table header.

The layout of the header here is for the table's header view. You can include a custom header for every table section by implementing the UITableViewDelegate method tableView:viewForHeaderInSection:. There are equivalent properties and methods for the table and section footers.

It is possible to handle this type of layout in Interface Builder and load the XIB files for this type of layout. Sadly though, on the iPhone, reading loading lots of views from XIB files is slow (I suspect this is due to slow reading from the Flash memory) and doesn't always allow configuration of every property.

For this reason, I normally sketch my views in Interface Builder and then manually recreate the same thing in code. That's what I've done here: picking coordinates for the headerLabel that looks balanced in the view.

Cell backgrounds

The cell background needs to incorporate the tops and bottoms of table "sections". For this reason, the backgroundView and selectedBackgroundView normally need to be set on a row-by-row basis.

In your tableView:cellForRowAtIndexPath: method where you are configuring the cell for a given row, this code will handle that behavior:

UIImage *rowBackground;
UIImage *selectionBackground;
NSInteger sectionRows = [aTableView numberOfRowsInSection:[indexPath section]];
NSInteger row = [indexPath row];
if (row == 0 && row == sectionRows - 1)
{
rowBackground = [UIImage imageNamed:@"topAndBottomRow.png"];
selectionBackground = [UIImage imageNamed:@"topAndBottomRowSelected.png"];
}
else if (row == 0)
{
rowBackground = [UIImage imageNamed:@"topRow.png"];
selectionBackground = [UIImage imageNamed:@"topRowSelected.png"];
}
else if (row == sectionRows - 1)
{
rowBackground = [UIImage imageNamed:@"bottomRow.png"];
selectionBackground = [UIImage imageNamed:@"bottomRowSelected.png"];
}
else
{
rowBackground = [UIImage imageNamed:@"middleRow.png"];
selectionBackground = [UIImage imageNamed:@"middleRowSelected.png"];
}
((UIImageView *)cell.backgroundView).image = rowBackground;
((UIImageView *)cell.selectedBackgroundView).image = selectionBackground;
Layout within the contentView

Layout of elements within the contentView need only be set on construction of the contentView (not on a row-by-row basis).

Sadly, laying out UILabels in the contentView (like the "Cell at row X." and "Some other infomation." lables in this example) is a little verbose.

The following code is run immediately after the allocation of the UITableViewCell to position the "Cell at row X." label:

const CGFloat LABEL_HEIGHT = 20;
UIImage *image = [UIImage imageNamed:@"imageA.png"];
//
// Create the label for the top row of text
//
topLabel =
[[[UILabel alloc]
initWithFrame:
CGRectMake(
image.size.width + 2.0 * cell.indentationWidth,
0.5 * (aTableView.rowHeight - 2 * LABEL_HEIGHT),
aTableView.bounds.size.width -
image.size.width - 4.0 * cell.indentationWidth
- indicatorImage.size.width,
LABEL_HEIGHT)]
autorelease];
[cell.contentView addSubview:topLabel];
//
// Configure the properties for the text that are the same on every row
//
topLabel.tag = TOP_LABEL_TAG;
topLabel.backgroundColor = [UIColor clearColor];
topLabel.textColor = [UIColor colorWithRed:0.25 green:0.0 blue:0.0 alpha:1.0];
topLabel.highlightedTextColor = [UIColor colorWithRed:1.0 green:1.0 blue:0.9 alpha:1.0];
topLabel.font = [UIFont systemFontOfSize:[UIFont labelFontSize]];
//
// Create a background image view.
//
cell.backgroundView = [[[UIImageView alloc] init] autorelease];
cell.selectedBackgroundView = [[[UIImageView alloc] init] autorelease];

In my mind, it seems like there should be a more efficient way to do this. I hold out the possibility that there is.

This code spends most of its time working out where the label should be placed. It needs to go right of the image, left of the accessoryView, middle of the row but above the "Some other information." label.

Other adornments

The accessoryView is just a UIImageView. The cell.image is set as a property. These are extremely simple additions but they make the table cells far more impactful.

Conclusion

You can download the EasyCustomTable project as a zip file (60kb).

The code includes a #define at the top that allows you to toggle the custom drawing on and off.

None of this is particularly revolutionary (it is all in the iPhone documentation) but it is still easy to miss the properties and methods that make it easy.

This does require custom images. If you've never drawn anything, now is a good time to learn inkscape (it's free and very good for the price). You could also use Adobe Illustrator but if you have that much money, pay an artist to draw it for you.

Layout of the content in code is probably the weakest part of the approach I've presented. To make it easier, you can pre-layout everything in Interface Builder and copy the layout into code. For complicated layouts, you could even try using nib2objc to convert your XIB files to code automatically (although I've never done this, I'm just mentioning nib2objc because the idea is so cool).



]]>
Objective-C �Convert NSString to int and Vice Versahttp://www.aygfsteel.com/sealyu/archive/2010/10/05/333773.htmlsealsealTue, 05 Oct 2010 13:01:00 GMThttp://www.aygfsteel.com/sealyu/archive/2010/10/05/333773.htmlhttp://www.aygfsteel.com/sealyu/comments/333773.htmlhttp://www.aygfsteel.com/sealyu/archive/2010/10/05/333773.html#Feedback0http://www.aygfsteel.com/sealyu/comments/commentRss/333773.htmlhttp://www.aygfsteel.com/sealyu/services/trackbacks/333773.htmlConvert NSString to int

1 NSString *aNumberString = @"123";
2 int i = [aNumberString intValue];

 

Convert int to NSString

1 int aNumber = 123;
2 NSString *aString = [NSString stringWithFormat:@"%d", aNumber];



]]>
How to Use UIDatePicker From UIKit in iPhone Programminghttp://www.aygfsteel.com/sealyu/archive/2010/10/04/333744.htmlsealsealMon, 04 Oct 2010 14:26:00 GMThttp://www.aygfsteel.com/sealyu/archive/2010/10/04/333744.htmlhttp://www.aygfsteel.com/sealyu/comments/333744.htmlhttp://www.aygfsteel.com/sealyu/archive/2010/10/04/333744.html#Feedback0http://www.aygfsteel.com/sealyu/comments/commentRss/333744.htmlhttp://www.aygfsteel.com/sealyu/services/trackbacks/333744.htmlHere is a great way to ask your users to input dates on your iPhone app.

When you use UIDatePicker in your app you will a tumbler that lets users select a date that you may use in other parts of your app.

In order to use UIDatePicker you will need to implement the UIPickerViewDelegate delegate and then add a UIPicker to your subview. To retrieve the date that the user inputs you can use the target-action pattern to assign a method to execute once the user has picked a date. See the video below:

Here is the code from the example:

Implement the UIDatePickerView Delegate

The first thing we needed to do was indicate that our view controller would be acting as a delegate for the UITextField. To do this you simply need to declare it in the interface file:

#import <UIKit/UIKit.h>
//UIPicker requires an object that adopts the UIPickerViewDelegate protocol
@interface DatePicker : UIViewController<UIPickerViewDelegate> {
}
@end

Add the UILabel and UIDatePicker Objects

This part is straightforward enough: you essentially create a label and a date picker and add them both to the view controller’s subview collection. This is the typical pattern used to build up a view in code.

#import "DatePicker.h"
@implementation DatePicker
UILabel *label;
UIDatePicker *datePicker;
- (void)viewDidLoad {
[super viewDidLoad];
//Create label
label = [[UILabel alloc] init];
label.frame = CGRectMake(10, 10, 300, 40);
label.textAlignment = UITextAlignmentCenter;
//Use NSDateFormatter to write out the date in a friendly format
NSDateFormatter *df = [[NSDateFormatter alloc] init];
df.dateStyle = NSDateFormatterMediumStyle;
label.text = [NSString stringWithFormat:@"%@",
[df stringFromDate:[NSDate date]]];
[df release];
[self.view addSubview:label];
[label release];
// Initialization code
datePicker = [[UIDatePicker alloc] initWithFrame:CGRectMake(0, 250, 325, 250)];
datePicker.datePickerMode = UIDatePickerModeDate;
datePicker.hidden = NO;
datePicker.date = [NSDate date];
[datePicker addTarget:self
action:@selector(changeDateInLabel:)
forControlEvents:UIControlEventValueChanged];
[self.view addSubview:datePicker];
[datePicker release];
}
- (void)dealloc {
[datePicker release];
[label release];
[super dealloc];
}
@end

Implement Your Action Method

This is the method that you assigned to the UIControlEventValueChanged event above using the target-action pattern.

- (void)changeDateInLabel:(id)sender{
//Use NSDateFormatter to write out the date in a friendly format
NSDateFormatter *df = [[NSDateFormatter alloc] init];
df.dateStyle = NSDateFormatterMediumStyle;
label.text = [NSString stringWithFormat:@"%@",
[df stringFromDate:datePicker.date]];
[df release];
}

How this works is that when the user stops manipulating the tumbler an event called UIControlEventValueChanged occurs. Since we assigned the changeDateInLabel method as an action for this event the code in that method will execute updating the date in the label.

Time To Take Action!

Learning how to program is 5% reading and 95% action so the best way to learn is to do it yourself. Create a simple iPhone app that uses the date picker code.

Let us know how it goes in the comments below!



]]>
Ö÷Õ¾Ö©Öë³ØÄ£°å£º ÏĽòÏØ| ¹ȪÊÐ| ·½ÕýÏØ| ½­°²ÏØ| ÆåÅÆ| ²×Ô´| ÌìÈ«ÏØ| ËÞǨÊÐ| ÔóÆÕÏØ| ÍÅ·çÏØ| Ìì×£| Õ´»¯ÏØ| ¶¨Î÷ÊÐ| Äϰ²ÊÐ| ÂÖÌ¨ÏØ| ƽºÍÏØ| ½­´¨ÏØ| ¶«º£ÏØ| »áÍ¬ÏØ| Ö¾µ¤ÏØ| ƽÂÞÏØ| ÍÐÀïÏØ| ÐÐÌÆÏØ| Çຣʡ| ºâÑôÊÐ| Óà½­ÏØ| Õ¢±±Çø| ʯÖù| ÎÂÈªÏØ| ´ïÖÝÊÐ| ºéºþÊÐ| ±¦É½Çø| Ôª½­| ÈêÑôÏØ| ·á¶¼ÏØ| °²Ô¶ÏØ| Ôó¿âÏØ| °²Í¼ÏØ| ÉçÆìÏØ| °ºÈÊÏØ| ÔúÀ¼ÍÍÊÐ|