├── .gitignore ├── LICENSE.txt ├── README.md ├── oschina.xcodeproj ├── .svn │ ├── entries │ └── text-base │ │ └── project.pbxproj.svn-base ├── project.pbxproj └── xcshareddata │ └── xcschemes │ └── oschina.xcscheme └── oschina ├── .DS_Store ├── 001@2x.png ├── 002@2x.png ├── 003@2x.png ├── 004@2x.png ├── 005@2x.png ├── 006@2x.png ├── 007@2x.png ├── 008@2x.png ├── 009@2x.png ├── 010@2x.png ├── 011@2x.png ├── 012@2x.png ├── 013@2x.png ├── 014@2x.png ├── 015@2x.png ├── 016@2x.png ├── 017@2x.png ├── 018@2x.png ├── 019@2x.png ├── 020@2x.png ├── 021@2x.png ├── 022@2x.png ├── 023@2x.png ├── 024@2x.png ├── 025@2x.png ├── 026@2x.png ├── 027@2x.png ├── 028@2x.png ├── 029@2x.png ├── 030@2x.png ├── 031@2x.png ├── 032@2x.png ├── 033@2x.png ├── 034@2x.png ├── 035@2x.png ├── 036@2x.png ├── 037@2x.png ├── 038@2x.png ├── 039@2x.png ├── 040@2x.png ├── 041@2x.png ├── 042@2x.png ├── 043@2x.png ├── 044@2x.png ├── 045@2x.png ├── 046@2x.png ├── 047@2x.png ├── 048@2x.png ├── 049@2x.png ├── 050@2x.png ├── 051@2x.png ├── 052@2x.png ├── 053@2x.png ├── 054@2x.png ├── 055@2x.png ├── 056@2x.png ├── 057@2x.png ├── 058@2x.png ├── 059@2x.png ├── 060@2x.png ├── 061@2x.png ├── 062@2x.png ├── 063@2x.png ├── 064@2x.png ├── 065@2x.png ├── 067@2x.png ├── 068@2x.png ├── 069@2x.png ├── 070@2x.png ├── 071@2x.png ├── 072@2x.png ├── 073@2x.png ├── 074@2x.png ├── 075@2x.png ├── 076@2x.png ├── 077@2x.png ├── 078@2x.png ├── 079@2x.png ├── 080@2x.png ├── 081@2x.png ├── 082@2x.png ├── 083@2x.png ├── 084@2x.png ├── 085@2x.png ├── 086@2x.png ├── 087@2x.png ├── 088@2x.png ├── 089@2x.png ├── 090@2x.png ├── 091@2x.png ├── 092@2x.png ├── 093@2x.png ├── 094@2x.png ├── 095@2x.png ├── 096@2x.png ├── 097@2x.png ├── 098@2x.png ├── 100@2x.png ├── 101@2x.png ├── 103@2x.png ├── 104@2x.png ├── 105@2x.png ├── 640X185(1).png ├── 640x3.png ├── 640x60.png ├── 99@2x.png ├── AESCrypt.h ├── AESCrypt.m ├── AFHTTPClient.h ├── AFHTTPClient.m ├── AFHTTPRequestOperation.h ├── AFHTTPRequestOperation.m ├── AFImageRequestOperation.h ├── AFImageRequestOperation.m ├── AFJSONRequestOperation.h ├── AFJSONRequestOperation.m ├── AFJSONUtilities.h ├── AFJSONUtilities.m ├── AFNetworkActivityIndicatorManager.h ├── AFNetworkActivityIndicatorManager.m ├── AFNetworking.h ├── AFOSCClient.h ├── AFOSCClient.m ├── AFPropertyListRequestOperation.h ├── AFPropertyListRequestOperation.m ├── AFURLConnectionOperation.h ├── AFURLConnectionOperation.m ├── AFXMLRequestOperation.h ├── AFXMLRequestOperation.m ├── ASIWebPageRequest.h ├── ASIWebPageRequest.m ├── About.h ├── About.m ├── About.xib ├── ActivesView.h ├── ActivesView.m ├── ActivesView.xib ├── Activity.h ├── Activity.m ├── ApiError.h ├── ApiError.m ├── Blog.h ├── Blog.m ├── BlogDetail.h ├── BlogDetail.m ├── BlogDetail.xib ├── BlogUnit.h ├── BlogUnit.m ├── Categories ├── .DS_Store ├── UIView+JMNoise.h └── UIView+JMNoise.m ├── ChatPopView.h ├── ChatPopView.m ├── Classes ├── .DS_Store ├── ASIAuthenticationDialog.h ├── ASIAuthenticationDialog.m ├── ASICacheDelegate.h ├── ASIDataCompressor.h ├── ASIDataCompressor.m ├── ASIDataDecompressor.h ├── ASIDataDecompressor.m ├── ASIDownloadCache.h ├── ASIDownloadCache.m ├── ASIFormDataRequest.h ├── ASIFormDataRequest.m ├── ASIHTTPRequest.h ├── ASIHTTPRequest.m ├── ASIHTTPRequestConfig.h ├── ASIHTTPRequestDelegate.h ├── ASIInputStream.h ├── ASIInputStream.m ├── ASINetworkQueue.h ├── ASINetworkQueue.m ├── ASIProgressDelegate.h ├── CheckNetwork.h ├── CheckNetwork.m ├── Reachability.h └── Reachability.m ├── Comment.h ├── Comment.m ├── CommentRefer.h ├── CommentRefer.m ├── Config.h ├── Config.m ├── DataSingleton.h ├── DataSingleton.m ├── Default-568h@2x.png ├── Default.png ├── DynamicBase.m ├── DynamicBaseView.h ├── EGOCache ├── EGOCache.h └── EGOCache.m ├── EGORefreshTableHeaderView.h ├── EGORefreshTableHeaderView.m ├── FTCoreTextView.h ├── FTCoreTextView.m ├── Favorite.h ├── Favorite.m ├── FavoriteCell.h ├── FavoriteCell.m ├── FavoriteCell.xib ├── FavoritesView.h ├── FavoritesView.m ├── FavoritesView.xib ├── Friend.h ├── Friend.m ├── FriendCell.h ├── FriendCell.m ├── FriendCell.xib ├── FriendsView.h ├── FriendsView.m ├── FriendsView.xib ├── GCDiscreetNotificationView ├── GCDiscreetNotificationView.h └── GCDiscreetNotificationView.m ├── Graphics ├── photo_cropper_bg.png ├── photo_cropper_bg@2x.png ├── photo_cropper_rect.png ├── photo_cropper_rect@2x.png ├── photo_cropper_rect_on.png └── photo_cropper_rect_on@2x.png ├── Icon.png ├── Icon@2x.png ├── IconDownloader.h ├── IconDownloader.m ├── Images ├── .DS_Store ├── close.png └── close@2x.png ├── ImgRecord.h ├── ImgRecord.m ├── JSNotifier.h ├── JSNotifier.m ├── LoadingCell.h ├── LoadingCell.m ├── LoadingCell.xib ├── LoginView.h ├── LoginView.m ├── LoginView.xib ├── MBProgressHUD.h ├── MBProgressHUD.m ├── Message.h ├── Message.m ├── MessageCell.h ├── MessageCell.m ├── MessageCell.xib ├── MessageSystemPub.h ├── MessageSystemPub.m ├── MessageSystemPub.xib ├── MessageSystemView.h ├── MessageSystemView.m ├── MessageSystemView.xib ├── MessageView.h ├── MessageView.m ├── MessageView.xib ├── MsgCell.h ├── MsgCell.m ├── MsgCell.xib ├── MyBubbleView.h ├── MyBubbleView.m ├── MyBubbleView.xib ├── MyInfoCell.h ├── MyInfoCell.m ├── MyInfoCell.xib ├── MyPortraitCell.h ├── MyPortraitCell.m ├── MyPortraitCell.xib ├── MyThread.h ├── MyThread.m ├── MyView.h ├── MyView.m ├── MyView.xib ├── NSData+Base64.h ├── NSData+Base64.m ├── NSData+CommonCrypto.h ├── NSData+CommonCrypto.m ├── NSString+Base64.h ├── NSString+Base64.m ├── NdUncaughtExceptionHandler.h ├── NdUncaughtExceptionHandler.m ├── News.h ├── News.m ├── NewsBase.h ├── NewsBase.m ├── NewsBase.xib ├── NewsCell.h ├── NewsCell.m ├── NewsCell.xib ├── NewsDetail.h ├── NewsDetail.m ├── NewsDetail.xib ├── NewsView.h ├── NewsView.m ├── NewsView.xib ├── Notification_CommentCount.h ├── Notification_CommentCount.m ├── NotifyCheck@2x.png ├── NotifyX@2x.png ├── OSAppDelegate.h ├── OSAppDelegate.m ├── OSCNotice.h ├── OSCNotice.m ├── ObjectReply.h ├── ObjectReply.m ├── Panel ├── .DS_Store ├── Categories │ ├── .DS_Store │ ├── UIView+JMNoise.h │ └── UIView+JMNoise.m ├── Images │ ├── .DS_Store │ ├── close.png │ └── close@2x.png ├── Panels │ ├── .DS_Store │ ├── UAModalPanel.h │ ├── UAModalPanel.m │ ├── UATitledModalPanel.h │ └── UATitledModalPanel.m └── Views │ ├── .DS_Store │ ├── UAGradientBackground.h │ ├── UAGradientBackground.m │ ├── UANoisyGradientBackground.h │ ├── UANoisyGradientBackground.m │ ├── UARoundedRectView.h │ └── UARoundedRectView.m ├── Panels ├── .DS_Store ├── UAModalPanel.h ├── UAModalPanel.m ├── UATitledModalPanel.h └── UATitledModalPanel.m ├── Post.h ├── Post.m ├── PostBase.h ├── PostBase.m ├── PostBase.xib ├── PostCell.h ├── PostCell.m ├── PostCell.xib ├── PostDetail.h ├── PostPubView.h ├── PostPubView.m ├── PostPubView.xib ├── PostsView.h ├── PostsView.m ├── PostsView.xib ├── ProfileBase.h ├── ProfileBase.m ├── ProfileBase.xib ├── ProfileModel.h ├── ProfileModel.m ├── PubMessage.h ├── PubMessage.m ├── PubMessage.xib ├── PubTweet.h ├── PubTweet.m ├── PubTweet.xib ├── QuadCurveMenu.h ├── QuadCurveMenu.m ├── QuadCurveMenuItem.h ├── QuadCurveMenuItem.m ├── RTActiveCell.h ├── RTActiveCell.m ├── RTActiveCell.xib ├── RTLabel.h ├── RTLabel.m ├── RegexKitLite.h ├── RegexKitLite.m ├── RelativeNews.h ├── RelativeNews.m ├── ReplyMsgView.h ├── ReplyMsgView.m ├── ReplyMsgView.xib ├── SSPhotoCropper ├── Graphics │ ├── photo_cropper_bg.png │ ├── photo_cropper_bg@2x.png │ ├── photo_cropper_rect.png │ ├── photo_cropper_rect@2x.png │ ├── photo_cropper_rect_on.png │ └── photo_cropper_rect_on@2x.png ├── SSPhotoCropperViewController.h ├── SSPhotoCropperViewController.m └── SSPhotoCropperViewController.xib ├── SearchResult.h ├── SearchResult.m ├── SearchView.h ├── SearchView.m ├── SearchView.xib ├── SettingModel.h ├── SettingModel.m ├── SettingView.h ├── SettingView.m ├── SettingView.xib ├── ShareObject.h ├── ShareObject.m ├── ShareView.h ├── ShareView.m ├── ShareView.xib ├── SingleNews.h ├── SingleNews.m ├── SinglePost.h ├── SinglePost.m ├── SinglePost.xib ├── SinglePostDetail.h ├── SinglePostDetail.m ├── Software.h ├── Software.m ├── SoftwareCatalog.h ├── SoftwareCatalog.m ├── SoftwareDetail.h ├── SoftwareDetail.m ├── SoftwareDetail.xib ├── SoftwareTypeView.h ├── SoftwareTypeView.m ├── SoftwareTypeView.xib ├── SoftwareUnit.h ├── SoftwareUnit.m ├── SoftwareView.h ├── SoftwareView.m ├── SoftwareView.xib ├── SoftwaresBase.h ├── SoftwaresBase.m ├── SoftwaresBase.xib ├── TBXML-Code ├── .DS_Store ├── TBXML+Compression.m ├── TBXML+HTTP.m └── TBXML.m ├── TBXML-Headers ├── .DS_Store ├── TBXML+Compression.h ├── TBXML+HTTP.h └── TBXML.h ├── TBXML-Support ├── .DS_Store ├── TBXML-Prefix.pch └── TBXML-iOS-Prefix.pch ├── TQImageCache.h ├── TQImageCache.m ├── TSEmojiView.h ├── TSEmojiView.m ├── Tool.h ├── Tool.m ├── Tweet.h ├── Tweet.m ├── TweetBase2.h ├── TweetBase2.m ├── TweetBase2.xib ├── TweetCell.h ├── TweetCell.m ├── TweetCell.xib ├── TweetDetail.h ├── TweetDetail.m ├── TweetDetail.xib ├── TweetImgDetail.h ├── TweetImgDetail.m ├── TweetImgDetail.xib ├── TweetPubCache.h ├── TweetPubCache.m ├── TweetView.h ├── TwitterView.h ├── TwitterView.m ├── TwitterView.xib ├── UIImageView+AFNetworking.h ├── UIImageView+AFNetworking.m ├── UITap.h ├── UITap.m ├── UserActiveView.h ├── UserActiveView.m ├── UserActiveView.xib ├── UserBlogsView.h ├── UserBlogsView.m ├── UserBlogsView.xib ├── UserInfoView.h ├── UserInfoView.m ├── UserInfoView.xib ├── UserView2.h ├── UserView2.m ├── UserView2.xib ├── Views ├── .DS_Store ├── UAGradientBackground.h ├── UAGradientBackground.m ├── UANoisyGradientBackground.h ├── UANoisyGradientBackground.m ├── UARoundedRectView.h └── UARoundedRectView.m ├── aboutbg.jpg ├── aboutbg1136.jpg ├── account@2x.png ├── active@2x.png ├── answer@2x.png ├── answerunit3.png ├── avatar_loading.jpg ├── avatar_noimg.jpg ├── bg-addbutton-highlighted.png ├── bg-addbutton-highlighted@2x.png ├── bg-addbutton.png ├── bg-addbutton@2x.png ├── bg-menuitem-highlighted.png ├── bg-menuitem-highlighted@2x.png ├── bg-menuitem.png ├── bg-menuitem@2x.png ├── big_avatar.png ├── big_avatar_loading.png ├── blueArrow.png ├── blueArrow@2x.png ├── bubbleMine.png ├── bubbleMine@2x.png ├── bubbleSomeone.png ├── bubbleSomeone@2x.png ├── comment.png ├── commentlist@2x.png ├── detail@2x.png ├── en.lproj ├── .DS_Store └── InfoPlist.strings ├── enormego-EGOImageLoading-9a3fa6b ├── .DS_Store ├── EGOCache │ ├── EGOCache.h │ └── EGOCache.m ├── EGOImageButton │ ├── EGOImageButton.h │ └── EGOImageButton.m ├── EGOImageLoader │ ├── EGOImageLoadConnection.h │ ├── EGOImageLoadConnection.m │ ├── EGOImageLoader.h │ └── EGOImageLoader.m └── EGOImageView │ ├── EGOImageView.h │ └── EGOImageView.m ├── exit@2x.png ├── faceIcon.png ├── feedback@2x.png ├── icon-plus-highlighted.png ├── icon-plus-highlighted@2x.png ├── icon-plus.png ├── icon-plus@2x.png ├── icon-star.png ├── icon-star@2x.png ├── info@2x.png ├── k.png ├── logo@2x.png ├── main.m ├── man.png ├── microcomment.png ├── more@2x.png ├── oschina-Info.plist ├── oschina-Prefix.pch ├── portraitbody.png ├── question24@2x.png ├── rating@2x.png ├── search@2x.png ├── searchWhite@2x.png ├── setting@2x.png ├── share@2x.png ├── share_sina.png ├── share_tencent.png ├── software@2x.png ├── tweet24@2x.png ├── tweet@2x.png ├── tweetloading.jpg ├── userInfo@2x.png ├── weibo@2x.png └── woman.png /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | build/* 3 | *.pbxuser 4 | !default.pbxuser 5 | *.mode1v3 6 | !default.mode1v3 7 | *.mode2v3 8 | !default.mode2v3 9 | *.perspectivev3 10 | !default.perspectivev3 11 | *.xcworkspace 12 | !default.xcworkspace 13 | xcuserdata 14 | profile 15 | *.moved-aside 16 | .svn 17 | .DS_Store 18 | -------------------------------------------------------------------------------- /oschina.xcodeproj/.svn/entries: -------------------------------------------------------------------------------- 1 | 10 2 | 3 | dir 4 | 23884 5 | svn://svn.oschina.net/data/svn/app/ios/oschina.xcodeproj 6 | svn://svn.oschina.net/data/svn 7 | 8 | 9 | 10 | 2012-03-12T03:08:31.499693Z 11 | 23884 12 | wj 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 5ab93012-cf17-0410-bd56-beef65fa8cb1 28 | 29 | xcuserdata 30 | dir 31 | 32 | project.pbxproj 33 | file 34 | 25873 35 | 36 | 37 | 38 | 2012-08-23T02:19:50.000000Z 39 | dd696d455174c164195703131c49dcd9 40 | 2012-08-24T02:22:05.645703Z 41 | 25873 42 | wj 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 231379 65 | 66 | project.xcworkspace 67 | dir 68 | 69 | -------------------------------------------------------------------------------- /oschina/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/.DS_Store -------------------------------------------------------------------------------- /oschina/001@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/001@2x.png -------------------------------------------------------------------------------- /oschina/002@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/002@2x.png -------------------------------------------------------------------------------- /oschina/003@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/003@2x.png -------------------------------------------------------------------------------- /oschina/004@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/004@2x.png -------------------------------------------------------------------------------- /oschina/005@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/005@2x.png -------------------------------------------------------------------------------- /oschina/006@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/006@2x.png -------------------------------------------------------------------------------- /oschina/007@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/007@2x.png -------------------------------------------------------------------------------- /oschina/008@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/008@2x.png -------------------------------------------------------------------------------- /oschina/009@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/009@2x.png -------------------------------------------------------------------------------- /oschina/010@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/010@2x.png -------------------------------------------------------------------------------- /oschina/011@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/011@2x.png -------------------------------------------------------------------------------- /oschina/012@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/012@2x.png -------------------------------------------------------------------------------- /oschina/013@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/013@2x.png -------------------------------------------------------------------------------- /oschina/014@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/014@2x.png -------------------------------------------------------------------------------- /oschina/015@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/015@2x.png -------------------------------------------------------------------------------- /oschina/016@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/016@2x.png -------------------------------------------------------------------------------- /oschina/017@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/017@2x.png -------------------------------------------------------------------------------- /oschina/018@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/018@2x.png -------------------------------------------------------------------------------- /oschina/019@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/019@2x.png -------------------------------------------------------------------------------- /oschina/020@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/020@2x.png -------------------------------------------------------------------------------- /oschina/021@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/021@2x.png -------------------------------------------------------------------------------- /oschina/022@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/022@2x.png -------------------------------------------------------------------------------- /oschina/023@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/023@2x.png -------------------------------------------------------------------------------- /oschina/024@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/024@2x.png -------------------------------------------------------------------------------- /oschina/025@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/025@2x.png -------------------------------------------------------------------------------- /oschina/026@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/026@2x.png -------------------------------------------------------------------------------- /oschina/027@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/027@2x.png -------------------------------------------------------------------------------- /oschina/028@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/028@2x.png -------------------------------------------------------------------------------- /oschina/029@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/029@2x.png -------------------------------------------------------------------------------- /oschina/030@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/030@2x.png -------------------------------------------------------------------------------- /oschina/031@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/031@2x.png -------------------------------------------------------------------------------- /oschina/032@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/032@2x.png -------------------------------------------------------------------------------- /oschina/033@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/033@2x.png -------------------------------------------------------------------------------- /oschina/034@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/034@2x.png -------------------------------------------------------------------------------- /oschina/035@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/035@2x.png -------------------------------------------------------------------------------- /oschina/036@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/036@2x.png -------------------------------------------------------------------------------- /oschina/037@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/037@2x.png -------------------------------------------------------------------------------- /oschina/038@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/038@2x.png -------------------------------------------------------------------------------- /oschina/039@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/039@2x.png -------------------------------------------------------------------------------- /oschina/040@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/040@2x.png -------------------------------------------------------------------------------- /oschina/041@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/041@2x.png -------------------------------------------------------------------------------- /oschina/042@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/042@2x.png -------------------------------------------------------------------------------- /oschina/043@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/043@2x.png -------------------------------------------------------------------------------- /oschina/044@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/044@2x.png -------------------------------------------------------------------------------- /oschina/045@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/045@2x.png -------------------------------------------------------------------------------- /oschina/046@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/046@2x.png -------------------------------------------------------------------------------- /oschina/047@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/047@2x.png -------------------------------------------------------------------------------- /oschina/048@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/048@2x.png -------------------------------------------------------------------------------- /oschina/049@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/049@2x.png -------------------------------------------------------------------------------- /oschina/050@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/050@2x.png -------------------------------------------------------------------------------- /oschina/051@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/051@2x.png -------------------------------------------------------------------------------- /oschina/052@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/052@2x.png -------------------------------------------------------------------------------- /oschina/053@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/053@2x.png -------------------------------------------------------------------------------- /oschina/054@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/054@2x.png -------------------------------------------------------------------------------- /oschina/055@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/055@2x.png -------------------------------------------------------------------------------- /oschina/056@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/056@2x.png -------------------------------------------------------------------------------- /oschina/057@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/057@2x.png -------------------------------------------------------------------------------- /oschina/058@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/058@2x.png -------------------------------------------------------------------------------- /oschina/059@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/059@2x.png -------------------------------------------------------------------------------- /oschina/060@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/060@2x.png -------------------------------------------------------------------------------- /oschina/061@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/061@2x.png -------------------------------------------------------------------------------- /oschina/062@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/062@2x.png -------------------------------------------------------------------------------- /oschina/063@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/063@2x.png -------------------------------------------------------------------------------- /oschina/064@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/064@2x.png -------------------------------------------------------------------------------- /oschina/065@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/065@2x.png -------------------------------------------------------------------------------- /oschina/067@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/067@2x.png -------------------------------------------------------------------------------- /oschina/068@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/068@2x.png -------------------------------------------------------------------------------- /oschina/069@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/069@2x.png -------------------------------------------------------------------------------- /oschina/070@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/070@2x.png -------------------------------------------------------------------------------- /oschina/071@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/071@2x.png -------------------------------------------------------------------------------- /oschina/072@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/072@2x.png -------------------------------------------------------------------------------- /oschina/073@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/073@2x.png -------------------------------------------------------------------------------- /oschina/074@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/074@2x.png -------------------------------------------------------------------------------- /oschina/075@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/075@2x.png -------------------------------------------------------------------------------- /oschina/076@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/076@2x.png -------------------------------------------------------------------------------- /oschina/077@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/077@2x.png -------------------------------------------------------------------------------- /oschina/078@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/078@2x.png -------------------------------------------------------------------------------- /oschina/079@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/079@2x.png -------------------------------------------------------------------------------- /oschina/080@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/080@2x.png -------------------------------------------------------------------------------- /oschina/081@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/081@2x.png -------------------------------------------------------------------------------- /oschina/082@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/082@2x.png -------------------------------------------------------------------------------- /oschina/083@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/083@2x.png -------------------------------------------------------------------------------- /oschina/084@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/084@2x.png -------------------------------------------------------------------------------- /oschina/085@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/085@2x.png -------------------------------------------------------------------------------- /oschina/086@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/086@2x.png -------------------------------------------------------------------------------- /oschina/087@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/087@2x.png -------------------------------------------------------------------------------- /oschina/088@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/088@2x.png -------------------------------------------------------------------------------- /oschina/089@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/089@2x.png -------------------------------------------------------------------------------- /oschina/090@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/090@2x.png -------------------------------------------------------------------------------- /oschina/091@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/091@2x.png -------------------------------------------------------------------------------- /oschina/092@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/092@2x.png -------------------------------------------------------------------------------- /oschina/093@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/093@2x.png -------------------------------------------------------------------------------- /oschina/094@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/094@2x.png -------------------------------------------------------------------------------- /oschina/095@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/095@2x.png -------------------------------------------------------------------------------- /oschina/096@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/096@2x.png -------------------------------------------------------------------------------- /oschina/097@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/097@2x.png -------------------------------------------------------------------------------- /oschina/098@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/098@2x.png -------------------------------------------------------------------------------- /oschina/100@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/100@2x.png -------------------------------------------------------------------------------- /oschina/101@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/101@2x.png -------------------------------------------------------------------------------- /oschina/103@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/103@2x.png -------------------------------------------------------------------------------- /oschina/104@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/104@2x.png -------------------------------------------------------------------------------- /oschina/105@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/105@2x.png -------------------------------------------------------------------------------- /oschina/640X185(1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/640X185(1).png -------------------------------------------------------------------------------- /oschina/640x3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/640x3.png -------------------------------------------------------------------------------- /oschina/640x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/640x60.png -------------------------------------------------------------------------------- /oschina/99@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/99@2x.png -------------------------------------------------------------------------------- /oschina/AESCrypt.h: -------------------------------------------------------------------------------- 1 | // 2 | // AESCrypt.h 3 | // Gurpartap Singh 4 | // 5 | // Created by Gurpartap Singh on 06/05/12. 6 | // Copyright (c) 2012 Gurpartap Singh 7 | // 8 | // MIT License 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining 11 | // a copy of this software and associated documentation files (the 12 | // "Software"), to deal in the Software without restriction, including 13 | // without limitation the rights to use, copy, modify, merge, publish, 14 | // distribute, sublicense, and/or sell copies of the Software, and to 15 | // permit persons to whom the Software is furnished to do so, subject to 16 | // the following conditions: 17 | // 18 | // The above copyright notice and this permission notice shall be 19 | // included in all copies or substantial portions of the Software. 20 | // 21 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 23 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 25 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 26 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 27 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28 | // 29 | 30 | #import 31 | 32 | @interface AESCrypt 33 | 34 | + (NSString *)encrypt:(NSString *)message password:(NSString *)password; 35 | + (NSString *)decrypt:(NSString *)base64EncodedString password:(NSString *)password; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /oschina/AFJSONUtilities.h: -------------------------------------------------------------------------------- 1 | // AFJSONUtilities.h 2 | // 3 | // Copyright (c) 2011 Gowalla (http://gowalla.com/) 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import 24 | 25 | extern NSData * AFJSONEncode(id object, NSError **error); 26 | extern id AFJSONDecode(NSData *data, NSError **error); 27 | -------------------------------------------------------------------------------- /oschina/AFNetworking.h: -------------------------------------------------------------------------------- 1 | // AFNetworking.h 2 | // 3 | // Copyright (c) 2011 Gowalla (http://gowalla.com/) 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import 24 | #import 25 | 26 | #ifndef _AFNETWORKING_ 27 | #define _AFNETWORKING_ 28 | 29 | #import "AFURLConnectionOperation.h" 30 | 31 | #import "AFHTTPRequestOperation.h" 32 | #import "AFJSONRequestOperation.h" 33 | #import "AFXMLRequestOperation.h" 34 | #import "AFPropertyListRequestOperation.h" 35 | #import "AFHTTPClient.h" 36 | 37 | #import "AFImageRequestOperation.h" 38 | 39 | #if __IPHONE_OS_VERSION_MIN_REQUIRED 40 | #import "AFNetworkActivityIndicatorManager.h" 41 | #import "UIImageView+AFNetworking.h" 42 | #endif 43 | 44 | #endif /* _AFNETWORKING_ */ 45 | -------------------------------------------------------------------------------- /oschina/AFOSCClient.h: -------------------------------------------------------------------------------- 1 | // 2 | // AFOSCClient.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-8-14. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "About.h" 10 | #import "AFHTTPClient.h" 11 | 12 | @interface AFOSCClient : AFHTTPClient 13 | 14 | + (AFOSCClient *)sharedClient; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /oschina/AFOSCClient.m: -------------------------------------------------------------------------------- 1 | // 2 | // AFOSCClient.m 3 | // oschina 4 | // 5 | // Created by wangjun on 12-8-14. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "AFOSCClient.h" 10 | #import "AFXMLRequestOperation.h" 11 | 12 | //static NSString * const kAFTwitterAPIBaseURLString = @"http://www.oschina.net/action/api/"; 13 | //static NSString * const kAFUrl = @"http://" 14 | //#define kAFUrl @"http://192.168.1.213/action/api/" 15 | #define kAFUrl @"http://www.oschina.net/action/api/" 16 | 17 | @interface AFOSCClient () 18 | 19 | @end 20 | 21 | @implementation AFOSCClient 22 | 23 | + (AFOSCClient *)sharedClient { 24 | static AFOSCClient *_sharedClient = nil; 25 | static dispatch_once_t onceToken; 26 | dispatch_once(&onceToken, ^{ 27 | _sharedClient = [[AFOSCClient alloc] initWithBaseURL:[NSURL URLWithString:kAFUrl]]; 28 | [_sharedClient setDefaultHeader:@"User-Agent" value:[NSString stringWithFormat:@"%@/%@", [Tool getOSVersion], [Config Instance].getIOSGuid]]; 29 | }); 30 | 31 | return _sharedClient; 32 | } 33 | 34 | - (id)initWithBaseURL:(NSURL *)url { 35 | self = [super initWithBaseURL:url]; 36 | if (!self) { 37 | return nil; 38 | } 39 | 40 | [self registerHTTPOperationClass:[AFXMLRequestOperation class]]; 41 | 42 | // Accept HTTP Header; see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1 43 | [self setDefaultHeader:@"Accept" value:@"application/json"]; 44 | 45 | return self; 46 | } 47 | 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /oschina/About.h: -------------------------------------------------------------------------------- 1 | // 2 | // About.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-5. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "FavoritesView.h" 11 | #import "SearchView.h" 12 | #import "Tool.h" 13 | #import "FriendsView.h" 14 | #import "SoftwareView.h" 15 | #import "SoftwareTypeView.h" 16 | 17 | @interface About : UIViewController 18 | 19 | @property (strong, nonatomic) IBOutlet UILabel *lblVersion; 20 | @property (unsafe_unretained, nonatomic) IBOutlet UILabel *lblOSC; 21 | @property (unsafe_unretained, nonatomic) IBOutlet UILabel *lblCopyright; 22 | @property (strong, nonatomic) IBOutlet UIImageView *img; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /oschina/About.m: -------------------------------------------------------------------------------- 1 | // 2 | // About.m 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-5. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "About.h" 10 | 11 | @implementation About 12 | @synthesize lblVersion; 13 | 14 | #pragma mark - View lifecycle 15 | 16 | - (void)viewDidLoad 17 | { 18 | [super viewDidLoad]; 19 | 20 | UIBarButtonItem *btnWeb = [[UIBarButtonItem alloc] initWithTitle:@"访问手机版" style:UIBarButtonItemStyleBordered target:self action:@selector(clickWeb:)]; 21 | self.navigationItem.rightBarButtonItem = btnWeb; 22 | 23 | self.lblVersion.text = [NSString stringWithFormat:@"版本: %@", AppVersion]; 24 | 25 | self.navigationItem.title = @"关于我们"; 26 | 27 | if (IS_IPHONE_5) { 28 | self.lblVersion.center = CGPointMake(self.lblVersion.center.x, self.lblVersion.center.y + 88); 29 | self.lblOSC.center = CGPointMake(self.lblOSC.center.x, self.lblOSC.center.y + 88); 30 | self.lblCopyright.center = CGPointMake(self.lblCopyright.center.x, self.lblCopyright.center.y + 88); 31 | self.img.image = [UIImage imageNamed:@"aboutbg1136.jpg"]; 32 | } 33 | } 34 | - (void)clickWeb:(id)sender 35 | { 36 | [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://m.oschina.net"]]; 37 | } 38 | - (void)viewDidUnload 39 | { 40 | [self setLblVersion:nil]; 41 | [self setLblOSC:nil]; 42 | [self setLblVersion:nil]; 43 | [self setLblCopyright:nil]; 44 | [self setImg:nil]; 45 | [super viewDidUnload]; 46 | } 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /oschina/ActivesView.h: -------------------------------------------------------------------------------- 1 | // 2 | // ActivesView.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-8. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "NewsDetail.h" 11 | #import "PostDetail.h" 12 | #import "Activity.h" 13 | //#import "ColorActiveCell.h" 14 | #import "FTCoreTextView.h" 15 | #import "ShareView.h" 16 | #import "News.h" 17 | #import "Post.h" 18 | #import "Tweet.h" 19 | #import "EGORefreshTableHeaderView.h" 20 | #import "IconDownloader.h" 21 | #import "ObjectReply.h" 22 | #import "RTActiveCell.h" 23 | #import "TQImageCache.h" 24 | 25 | @interface ActivesView : UIViewController 26 | { 27 | NSMutableArray *activies; 28 | BOOL isLoading; 29 | BOOL isLoadOver; 30 | int allCount; 31 | 32 | //下拉刷新 33 | EGORefreshTableHeaderView *_refreshHeaderView; 34 | BOOL _reloading; 35 | 36 | TQImageCache * _iconCache; 37 | } 38 | @property (strong, nonatomic) IBOutlet UITableView *tableActivies; 39 | 40 | - (void)reloadType:(int)ncatalog; 41 | @property int catalog; 42 | - (void)reload:(BOOL)noRefresh; 43 | 44 | //异步加载图片专用 45 | //@property (nonatomic, retain) NSMutableDictionary *imageDownloadsInProgress; 46 | //@property (nonatomic, retain) NSMutableDictionary *tweetDownloadsInProgress; 47 | //- (void)startIconDownload:(ImgRecord *)imgRecord forIndexPath:(NSIndexPath *)indexPath; 48 | //- (void)startIconDownload2:(ImgRecord *)imgRecord forIndexPath:(NSIndexPath *)indexPath; 49 | - (void)clear; 50 | //下拉刷新 51 | - (void)refresh; 52 | - (void)reloadTableViewDataSource; 53 | - (void)doneLoadingTableViewData; 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /oschina/Activity.h: -------------------------------------------------------------------------------- 1 | // 2 | // Activity.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-9. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "Tool.h" 11 | #import "ObjectReply.h" 12 | #import "FTCoreTextView.h" 13 | #import "RTLabel.h" 14 | #import "RTActiveCell.h" 15 | 16 | @interface Activity : NSObject 17 | 18 | @property int _id; 19 | @property (copy,nonatomic) NSString * img; 20 | @property (retain,nonatomic) UIImage * imgData; 21 | @property (copy,nonatomic) NSString * author; 22 | @property int authorid; 23 | @property int catalog; 24 | @property int objectid; 25 | @property (copy,nonatomic) NSString * message; 26 | @property (copy,nonatomic) NSString * fromNowOn; 27 | @property int objectType; 28 | @property int objectCatalog; 29 | @property (copy,nonatomic) NSString * objectTitle; 30 | @property int commentCount; 31 | @property (copy,nonatomic) NSString * result; 32 | @property int height; 33 | @property BOOL isGetHeight; 34 | @property (retain,nonatomic) ObjectReply * reply; 35 | @property (nonatomic,retain) UIImage * imgTweetData; 36 | @property (copy,nonatomic) NSString * imgTweet; 37 | @property (copy,nonatomic) NSString * url; 38 | 39 | - (id)initWithParameters:(int)newid 40 | andImg:(NSString *)nimg 41 | andAuthor:(NSString *)nauthor 42 | andAuthorID:(int)nauthorid 43 | andCatalog:(int)ncatalog 44 | andObjectid:(int)nobjectid 45 | andMessage:(NSString *)nmsg 46 | andPubDate:(NSString *)pubDate 47 | andCommentCount:(int)ncommentCount 48 | andObjectType:(int)nobjectType 49 | andObjectCatalog:(int)nobjectCatalog 50 | andObjectTitle:(NSString *)nObjectTitle 51 | andForUserView:(BOOL)isUserView 52 | andReply:(ObjectReply *)nreply 53 | andImgTweet:(NSString *)nimgTweet 54 | andUrl:(NSString *)nurl; 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /oschina/ApiError.h: -------------------------------------------------------------------------------- 1 | // 2 | // ApiError.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-19. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ApiError : NSObject 12 | 13 | @property int errorCode; 14 | @property (copy,nonatomic) NSString * errorMessage; 15 | 16 | - (id)initWithParameters:(int)nerrorCode andMessage:(NSString *)nerrorMessage; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /oschina/ApiError.m: -------------------------------------------------------------------------------- 1 | // 2 | // ApiError.m 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-19. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "ApiError.h" 10 | 11 | @implementation ApiError 12 | 13 | @synthesize errorCode; 14 | @synthesize errorMessage; 15 | 16 | - (id)initWithParameters:(int)nerrorCode andMessage:(NSString *)nerrorMessage 17 | { 18 | ApiError *error = [[ApiError alloc] init]; 19 | error.errorCode = nerrorCode; 20 | error.errorMessage = nerrorMessage; 21 | return error; 22 | } 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /oschina/Blog.h: -------------------------------------------------------------------------------- 1 | // 2 | // Blog.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-4-25. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface Blog : NSObject 12 | 13 | @property int _id; 14 | @property (copy,nonatomic) NSString * title; 15 | @property (copy,nonatomic) NSString * where; 16 | @property (copy,nonatomic) NSString * body; 17 | @property (copy,nonatomic) NSString * author; 18 | @property int authorid; 19 | @property int documentType; 20 | @property (copy,nonatomic) NSString * pubDate; 21 | @property BOOL favorite; 22 | @property (copy,nonatomic) NSString * url; 23 | @property int commentCount; 24 | 25 | - (id)initWithParameters:(int)nid 26 | andTitle:(NSString *)ntitle 27 | andWhere:(NSString *)nwhere 28 | andBody:(NSString *)nbody 29 | andAuthor:(NSString *)nauthor 30 | andAuthorid:(int)nauthorid 31 | andDocumentType:(int)nDocumentType 32 | andPubDate:(NSString *)nPubDate 33 | andFavorite:(BOOL)nfavorite 34 | andUrl:(NSString *)nurl 35 | andCommentCount:(int)ncommentCount; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /oschina/Blog.m: -------------------------------------------------------------------------------- 1 | // 2 | // Blog.m 3 | // oschina 4 | // 5 | // Created by wangjun on 12-4-25. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "Blog.h" 10 | 11 | @implementation Blog 12 | 13 | @synthesize _id; 14 | @synthesize title; 15 | @synthesize where; 16 | @synthesize body; 17 | @synthesize author; 18 | @synthesize authorid; 19 | @synthesize documentType; 20 | @synthesize pubDate; 21 | @synthesize favorite; 22 | @synthesize url; 23 | @synthesize commentCount; 24 | 25 | - (id)initWithParameters:(int)nid 26 | andTitle:(NSString *)ntitle 27 | andWhere:(NSString *)nwhere 28 | andBody:(NSString *)nbody 29 | andAuthor:(NSString *)nauthor 30 | andAuthorid:(int)nauthorid 31 | andDocumentType:(int)nDocumentType 32 | andPubDate:(NSString *)nPubDate 33 | andFavorite:(BOOL)nfavorite 34 | andUrl:(NSString *)nurl 35 | andCommentCount:(int)ncommentCount 36 | { 37 | Blog * b = [[Blog alloc] init]; 38 | b._id = nid; 39 | b.title = ntitle; 40 | b.where = nwhere; 41 | b.body = nbody; 42 | b.author = nauthor; 43 | b.authorid = nauthorid; 44 | b.documentType = nDocumentType; 45 | b.pubDate = nPubDate; 46 | b.favorite = nfavorite; 47 | b.url = nurl; 48 | b.commentCount = ncommentCount; 49 | return b; 50 | } 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /oschina/BlogDetail.h: -------------------------------------------------------------------------------- 1 | // 2 | // BlogDetail.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-27. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "Tool.h" 11 | #import "Blog.h" 12 | 13 | @interface BlogDetail : UIViewController 14 | { 15 | UIBarButtonItem * btnFavorite; 16 | } 17 | @property (strong, nonatomic) IBOutlet UIWebView *webView; 18 | @property (retain, nonatomic) Blog * singleBlog; 19 | @property int blogID; 20 | 21 | - (void)loadData:(Blog *)b; 22 | - (void)refreshFavorite:(Blog *)b; 23 | @end 24 | -------------------------------------------------------------------------------- /oschina/BlogUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // BlogUnit.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-7-3. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface BlogUnit : NSObject 12 | 13 | @property int _id; 14 | @property (copy,nonatomic) NSString * url; 15 | @property (copy,nonatomic) NSString * title; 16 | @property (copy,nonatomic) NSString * pubDate; 17 | @property (copy,nonatomic) NSString * authorName; 18 | @property int authorUID; 19 | @property int commentCount; 20 | @property int documentType; 21 | 22 | - (id)initWithParameters:(int)nid 23 | andUrl:(NSString *)nurl 24 | andTitle:(NSString *)ntitle 25 | andPubDate:(NSString *)npubDate 26 | andAuthorName:(NSString *)nauthorName 27 | andAuthorUID:(int)nauthorUID 28 | andCommentCount:(int)nCommentCount 29 | andDocumentType:(int)nDocumentType; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /oschina/BlogUnit.m: -------------------------------------------------------------------------------- 1 | // 2 | // BlogUnit.m 3 | // oschina 4 | // 5 | // Created by wangjun on 12-7-3. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "BlogUnit.h" 10 | 11 | @implementation BlogUnit 12 | 13 | @synthesize _id; 14 | @synthesize url; 15 | @synthesize title; 16 | @synthesize pubDate; 17 | @synthesize authorUID; 18 | @synthesize authorName; 19 | @synthesize commentCount; 20 | @synthesize documentType; 21 | 22 | - (id)initWithParameters:(int)nid 23 | andUrl:(NSString *)nurl 24 | andTitle:(NSString *)ntitle 25 | andPubDate:(NSString *)npubDate 26 | andAuthorName:(NSString *)nauthorName 27 | andAuthorUID:(int)nauthorUID 28 | andCommentCount:(int)nCommentCount 29 | andDocumentType:(int)nDocumentType 30 | { 31 | BlogUnit *b = [[BlogUnit alloc] init]; 32 | b._id = nid; 33 | b.url = nurl; 34 | b.title = ntitle; 35 | b.pubDate = npubDate; 36 | b.authorName = nauthorName; 37 | b.authorUID = nauthorUID; 38 | b.commentCount = nCommentCount; 39 | b.documentType = nDocumentType; 40 | return b; 41 | } 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /oschina/Categories/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/Categories/.DS_Store -------------------------------------------------------------------------------- /oschina/Categories/UIView+JMNoise.h: -------------------------------------------------------------------------------- 1 | // UAModalPanel 2 | // 3 | // Created by Matt Coneybeare on 1/8/12. 4 | // Copyright (c) 2012 Urban Apps. All rights reserved. 5 | // 6 | 7 | #import 8 | 9 | @interface UIView (JMNoise) 10 | 11 | // Can be used directly on UIView 12 | - (void)applyNoise; 13 | - (void)applyNoiseWithOpacity:(CGFloat)opacity atLayerIndex:(NSUInteger) layerIndex; 14 | - (void)applyNoiseWithOpacity:(CGFloat)opacity; 15 | 16 | // Can be invoked from a drawRect() method 17 | - (void)drawCGNoise; 18 | - (void)drawCGNoiseWithOpacity:(CGFloat)opacity; 19 | - (void)drawCGNoiseWithOpacity:(CGFloat)opacity blendMode:(CGBlendMode)blendMode; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /oschina/ChatPopView.h: -------------------------------------------------------------------------------- 1 | // 2 | // ChatPopView.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-8-28. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | typedef enum tagPopDirection 12 | { 13 | ePopDirectionLeft = 0, 14 | ePopDirectionRight, 15 | } ePopDirection; 16 | 17 | @interface ChatPopView : UIView 18 | 19 | @property (nonatomic,retain) UIImageView * popBackground; 20 | @property (nonatomic,retain) UILabel * contentLabel; 21 | @property (assign) ePopDirection direction; 22 | 23 | - (id) initWithFrame:(CGRect)frame popDirection:(ePopDirection)d; 24 | - (void)setText:(NSString *)str; 25 | 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /oschina/Classes/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/Classes/.DS_Store -------------------------------------------------------------------------------- /oschina/Classes/ASIAuthenticationDialog.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASIAuthenticationDialog.h 3 | // Part of ASIHTTPRequest -> http://allseeing-i.com/ASIHTTPRequest 4 | // 5 | // Created by Ben Copsey on 21/08/2009. 6 | // Copyright 2009 All-Seeing Interactive. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | @class ASIHTTPRequest; 12 | 13 | typedef enum _ASIAuthenticationType { 14 | ASIStandardAuthenticationType = 0, 15 | ASIProxyAuthenticationType = 1 16 | } ASIAuthenticationType; 17 | 18 | @interface ASIAutorotatingViewController : UIViewController 19 | @end 20 | 21 | @interface ASIAuthenticationDialog : ASIAutorotatingViewController { 22 | ASIHTTPRequest *request; 23 | ASIAuthenticationType type; 24 | UITableView *tableView; 25 | UIViewController *presentingController; 26 | BOOL didEnableRotationNotifications; 27 | } 28 | + (void)presentAuthenticationDialogForRequest:(ASIHTTPRequest *)request; 29 | + (void)dismiss; 30 | 31 | @property (retain) ASIHTTPRequest *request; 32 | @property (assign) ASIAuthenticationType type; 33 | @property (assign) BOOL didEnableRotationNotifications; 34 | @property (retain, nonatomic) UIViewController *presentingController; 35 | @end 36 | -------------------------------------------------------------------------------- /oschina/Classes/ASIDataCompressor.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASIDataCompressor.h 3 | // Part of ASIHTTPRequest -> http://allseeing-i.com/ASIHTTPRequest 4 | // 5 | // Created by Ben Copsey on 17/08/2010. 6 | // Copyright 2010 All-Seeing Interactive. All rights reserved. 7 | // 8 | 9 | // This is a helper class used by ASIHTTPRequest to handle deflating (compressing) data in memory and on disk 10 | // You may also find it helpful if you need to deflate data and files yourself - see the class methods below 11 | // Most of the zlib stuff is based on the sample code by Mark Adler available at http://zlib.net 12 | 13 | #import 14 | #import 15 | 16 | @interface ASIDataCompressor : NSObject { 17 | BOOL streamReady; 18 | z_stream zStream; 19 | } 20 | 21 | // Convenience constructor will call setupStream for you 22 | + (id)compressor; 23 | 24 | // Compress the passed chunk of data 25 | // Passing YES for shouldFinish will finalize the deflated data - you must pass YES when you are on the last chunk of data 26 | - (NSData *)compressBytes:(Bytef *)bytes length:(NSUInteger)length error:(NSError **)err shouldFinish:(BOOL)shouldFinish; 27 | 28 | // Convenience method - pass it some data, and you'll get deflated data back 29 | + (NSData *)compressData:(NSData*)uncompressedData error:(NSError **)err; 30 | 31 | // Convenience method - pass it a file containing the data to compress in sourcePath, and it will write deflated data to destinationPath 32 | + (BOOL)compressDataFromFile:(NSString *)sourcePath toFile:(NSString *)destinationPath error:(NSError **)err; 33 | 34 | // Sets up zlib to handle the inflating. You only need to call this yourself if you aren't using the convenience constructor 'compressor' 35 | - (NSError *)setupStream; 36 | 37 | // Tells zlib to clean up. You need to call this if you need to cancel deflating part way through 38 | // If deflating finishes or fails, this method will be called automatically 39 | - (NSError *)closeStream; 40 | 41 | @property (assign, readonly) BOOL streamReady; 42 | @end 43 | -------------------------------------------------------------------------------- /oschina/Classes/ASIDataDecompressor.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASIDataDecompressor.h 3 | // Part of ASIHTTPRequest -> http://allseeing-i.com/ASIHTTPRequest 4 | // 5 | // Created by Ben Copsey on 17/08/2010. 6 | // Copyright 2010 All-Seeing Interactive. All rights reserved. 7 | // 8 | 9 | // This is a helper class used by ASIHTTPRequest to handle inflating (decompressing) data in memory and on disk 10 | // You may also find it helpful if you need to inflate data and files yourself - see the class methods below 11 | // Most of the zlib stuff is based on the sample code by Mark Adler available at http://zlib.net 12 | 13 | #import 14 | #import 15 | 16 | @interface ASIDataDecompressor : NSObject { 17 | BOOL streamReady; 18 | z_stream zStream; 19 | } 20 | 21 | // Convenience constructor will call setupStream for you 22 | + (id)decompressor; 23 | 24 | // Uncompress the passed chunk of data 25 | - (NSData *)uncompressBytes:(Bytef *)bytes length:(NSUInteger)length error:(NSError **)err; 26 | 27 | // Convenience method - pass it some deflated data, and you'll get inflated data back 28 | + (NSData *)uncompressData:(NSData*)compressedData error:(NSError **)err; 29 | 30 | // Convenience method - pass it a file containing deflated data in sourcePath, and it will write inflated data to destinationPath 31 | + (BOOL)uncompressDataFromFile:(NSString *)sourcePath toFile:(NSString *)destinationPath error:(NSError **)err; 32 | 33 | // Sets up zlib to handle the inflating. You only need to call this yourself if you aren't using the convenience constructor 'decompressor' 34 | - (NSError *)setupStream; 35 | 36 | // Tells zlib to clean up. You need to call this if you need to cancel inflating part way through 37 | // If inflating finishes or fails, this method will be called automatically 38 | - (NSError *)closeStream; 39 | 40 | @property (assign, readonly) BOOL streamReady; 41 | @end 42 | -------------------------------------------------------------------------------- /oschina/Classes/ASIDownloadCache.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASIDownloadCache.h 3 | // Part of ASIHTTPRequest -> http://allseeing-i.com/ASIHTTPRequest 4 | // 5 | // Created by Ben Copsey on 01/05/2010. 6 | // Copyright 2010 All-Seeing Interactive. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "ASICacheDelegate.h" 11 | 12 | @interface ASIDownloadCache : NSObject { 13 | 14 | // The default cache policy for this cache 15 | // Requests that store data in the cache will use this cache policy if their cache policy is set to ASIUseDefaultCachePolicy 16 | // Defaults to ASIAskServerIfModifiedWhenStaleCachePolicy 17 | ASICachePolicy defaultCachePolicy; 18 | 19 | // The directory in which cached data will be stored 20 | // Defaults to a directory called 'ASIHTTPRequestCache' in the temporary directory 21 | NSString *storagePath; 22 | 23 | // Mediates access to the cache 24 | NSRecursiveLock *accessLock; 25 | 26 | // When YES, the cache will look for cache-control / pragma: no-cache headers, and won't reuse store responses if it finds them 27 | BOOL shouldRespectCacheControlHeaders; 28 | } 29 | 30 | // Returns a static instance of an ASIDownloadCache 31 | // In most circumstances, it will make sense to use this as a global cache, rather than creating your own cache 32 | // To make ASIHTTPRequests use it automatically, use [ASIHTTPRequest setDefaultCache:[ASIDownloadCache sharedCache]]; 33 | + (id)sharedCache; 34 | 35 | // A helper function that determines if the server has requested data should not be cached by looking at the request's response headers 36 | + (BOOL)serverAllowsResponseCachingForRequest:(ASIHTTPRequest *)request; 37 | 38 | @property (assign, nonatomic) ASICachePolicy defaultCachePolicy; 39 | @property (retain, nonatomic) NSString *storagePath; 40 | @property (retain) NSRecursiveLock *accessLock; 41 | @property (assign) BOOL shouldRespectCacheControlHeaders; 42 | @end 43 | -------------------------------------------------------------------------------- /oschina/Classes/ASIHTTPRequestConfig.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASIHTTPRequestConfig.h 3 | // Part of ASIHTTPRequest -> http://allseeing-i.com/ASIHTTPRequest 4 | // 5 | // Created by Ben Copsey on 14/12/2009. 6 | // Copyright 2009 All-Seeing Interactive. All rights reserved. 7 | // 8 | 9 | 10 | // ====== 11 | // Debug output configuration options 12 | // ====== 13 | 14 | // When set to 1 ASIHTTPRequests will print information about what a request is doing 15 | #ifndef DEBUG_REQUEST_STATUS 16 | #define DEBUG_REQUEST_STATUS 0 17 | #endif 18 | 19 | // When set to 1, ASIFormDataRequests will print information about the request body to the console 20 | #ifndef DEBUG_FORM_DATA_REQUEST 21 | #define DEBUG_FORM_DATA_REQUEST 0 22 | #endif 23 | 24 | // When set to 1, ASIHTTPRequests will print information about bandwidth throttling to the console 25 | #ifndef DEBUG_THROTTLING 26 | #define DEBUG_THROTTLING 0 27 | #endif 28 | 29 | // When set to 1, ASIHTTPRequests will print information about persistent connections to the console 30 | #ifndef DEBUG_PERSISTENT_CONNECTIONS 31 | #define DEBUG_PERSISTENT_CONNECTIONS 0 32 | #endif 33 | 34 | // When set to 1, ASIHTTPRequests will print information about HTTP authentication (Basic, Digest or NTLM) to the console 35 | #ifndef DEBUG_HTTP_AUTHENTICATION 36 | #define DEBUG_HTTP_AUTHENTICATION 0 37 | #endif 38 | -------------------------------------------------------------------------------- /oschina/Classes/ASIHTTPRequestDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASIHTTPRequestDelegate.h 3 | // Part of ASIHTTPRequest -> http://allseeing-i.com/ASIHTTPRequest 4 | // 5 | // Created by Ben Copsey on 13/04/2010. 6 | // Copyright 2010 All-Seeing Interactive. All rights reserved. 7 | // 8 | 9 | @class ASIHTTPRequest; 10 | 11 | @protocol ASIHTTPRequestDelegate 12 | 13 | @optional 14 | 15 | // These are the default delegate methods for request status 16 | // You can use different ones by setting didStartSelector / didFinishSelector / didFailSelector 17 | - (void)requestStarted:(ASIHTTPRequest *)request; 18 | - (void)request:(ASIHTTPRequest *)request didReceiveResponseHeaders:(NSDictionary *)responseHeaders; 19 | - (void)request:(ASIHTTPRequest *)request willRedirectToURL:(NSURL *)newURL; 20 | - (void)requestFinished:(ASIHTTPRequest *)request; 21 | - (void)requestFailed:(ASIHTTPRequest *)request; 22 | - (void)requestRedirected:(ASIHTTPRequest *)request; 23 | 24 | // When a delegate implements this method, it is expected to process all incoming data itself 25 | // This means that responseData / responseString / downloadDestinationPath etc are ignored 26 | // You can have the request call a different method by setting didReceiveDataSelector 27 | - (void)request:(ASIHTTPRequest *)request didReceiveData:(NSData *)data; 28 | 29 | // If a delegate implements one of these, it will be asked to supply credentials when none are available 30 | // The delegate can then either restart the request ([request retryUsingSuppliedCredentials]) once credentials have been set 31 | // or cancel it ([request cancelAuthentication]) 32 | - (void)authenticationNeededForRequest:(ASIHTTPRequest *)request; 33 | - (void)proxyAuthenticationNeededForRequest:(ASIHTTPRequest *)request; 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /oschina/Classes/ASIInputStream.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASIInputStream.h 3 | // Part of ASIHTTPRequest -> http://allseeing-i.com/ASIHTTPRequest 4 | // 5 | // Created by Ben Copsey on 10/08/2009. 6 | // Copyright 2009 All-Seeing Interactive. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class ASIHTTPRequest; 12 | 13 | // This is a wrapper for NSInputStream that pretends to be an NSInputStream itself 14 | // Subclassing NSInputStream seems to be tricky, and may involve overriding undocumented methods, so we'll cheat instead. 15 | // It is used by ASIHTTPRequest whenever we have a request body, and handles measuring and throttling the bandwidth used for uploading 16 | 17 | @interface ASIInputStream : NSObject { 18 | NSInputStream *stream; 19 | ASIHTTPRequest *request; 20 | } 21 | + (id)inputStreamWithFileAtPath:(NSString *)path request:(ASIHTTPRequest *)request; 22 | + (id)inputStreamWithData:(NSData *)data request:(ASIHTTPRequest *)request; 23 | 24 | @property (retain, nonatomic) NSInputStream *stream; 25 | @property (assign, nonatomic) ASIHTTPRequest *request; 26 | @end 27 | -------------------------------------------------------------------------------- /oschina/Classes/ASIProgressDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASIProgressDelegate.h 3 | // Part of ASIHTTPRequest -> http://allseeing-i.com/ASIHTTPRequest 4 | // 5 | // Created by Ben Copsey on 13/04/2010. 6 | // Copyright 2010 All-Seeing Interactive. All rights reserved. 7 | // 8 | 9 | @class ASIHTTPRequest; 10 | 11 | @protocol ASIProgressDelegate 12 | 13 | @optional 14 | 15 | // These methods are used to update UIProgressViews (iPhone OS) or NSProgressIndicators (Mac OS X) 16 | // If you are using a custom progress delegate, you may find it easier to implement didReceiveBytes / didSendBytes instead 17 | #if TARGET_OS_IPHONE 18 | - (void)setProgress:(float)newProgress; 19 | #else 20 | - (void)setDoubleValue:(double)newProgress; 21 | - (void)setMaxValue:(double)newMax; 22 | #endif 23 | 24 | // Called when the request receives some data - bytes is the length of that data 25 | - (void)request:(ASIHTTPRequest *)request didReceiveBytes:(long long)bytes; 26 | 27 | // Called when the request sends some data 28 | // The first 32KB (128KB on older platforms) of data sent is not included in this amount because of limitations with the CFNetwork API 29 | // bytes may be less than zero if a request needs to remove upload progress (probably because the request needs to run again) 30 | - (void)request:(ASIHTTPRequest *)request didSendBytes:(long long)bytes; 31 | 32 | // Called when a request needs to change the length of the content to download 33 | - (void)request:(ASIHTTPRequest *)request incrementDownloadSizeBy:(long long)newLength; 34 | 35 | // Called when a request needs to change the length of the content to upload 36 | // newLength may be less than zero when a request needs to remove the size of the internal buffer from progress tracking 37 | - (void)request:(ASIHTTPRequest *)request incrementUploadSizeBy:(long long)newLength; 38 | @end 39 | -------------------------------------------------------------------------------- /oschina/Classes/CheckNetwork.h: -------------------------------------------------------------------------------- 1 | // 2 | // CheckNetwork.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-5. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface CheckNetwork : NSObject 12 | 13 | +(BOOL)isExistenceNetwork; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /oschina/Classes/CheckNetwork.m: -------------------------------------------------------------------------------- 1 | // 2 | // CheckNetwork.m 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-5. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "CheckNetwork.h" 10 | #import "Reachability.h" 11 | 12 | @implementation CheckNetwork 13 | +(BOOL)isExistenceNetwork 14 | { 15 | // BOOL isExistenceNetwork; 16 | // Reachability *r = [Reachability reachabilityWithHostName:@"www.oschina.net"]; 17 | // switch ([r currentReachabilityStatus]) { 18 | // case NotReachable: 19 | // isExistenceNetwork=FALSE; 20 | // // NSLog(@"娌℃湁缃戠粶"); 21 | // break; 22 | // case ReachableViaWWAN: 23 | // isExistenceNetwork=TRUE; 24 | // // NSLog(@"姝e湪浣跨敤3G缃戠粶"); 25 | // break; 26 | // case ReachableViaWiFi: 27 | // isExistenceNetwork=TRUE; 28 | // // NSLog(@"姝e湪浣跨敤wifi缃戠粶"); 29 | // break; 30 | // } 31 | // return isExistenceNetwork; 32 | 33 | return YES; 34 | } 35 | @end 36 | -------------------------------------------------------------------------------- /oschina/Comment.h: -------------------------------------------------------------------------------- 1 | // 2 | // Comment.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-20. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface Comment : NSObject 13 | 14 | @property int _id; 15 | @property (copy,nonatomic) NSString * img; 16 | @property (retain,nonatomic) UIImage * imgData; 17 | @property (copy,nonatomic) NSString * author; 18 | @property int authorid; 19 | @property (copy,nonatomic) NSString * content; 20 | @property (copy,nonatomic) NSString * pubDate; 21 | @property (retain,nonatomic) NSMutableArray * replies; 22 | @property (retain,nonatomic) NSMutableArray * refers; 23 | @property int appClient; 24 | @property int catalog; 25 | @property int parentID; 26 | @property int height; 27 | @property int height_reference; 28 | @property float width_bubble; 29 | 30 | - (id)initWithParameters:(int)nid 31 | andImg:(NSString *)nimg 32 | andAuthor:(NSString *)nauthor 33 | andAuthorID:(int)nauthorid 34 | andContent:(NSString *)nContent 35 | andPubDate:(NSString *)nPubDate 36 | andReplies:(NSMutableArray *)array 37 | andRefers:(NSMutableArray *)nrefers 38 | andAppClient:(int)nappclient; 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /oschina/Comment.m: -------------------------------------------------------------------------------- 1 | // 2 | // Comment.m 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-20. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "Comment.h" 10 | #import "Tool.h" 11 | 12 | @implementation Comment 13 | 14 | @synthesize _id; 15 | @synthesize img; 16 | @synthesize imgData; 17 | @synthesize author; 18 | @synthesize authorid; 19 | @synthesize content; 20 | @synthesize pubDate; 21 | @synthesize replies; 22 | @synthesize catalog; 23 | @synthesize parentID; 24 | @synthesize height; 25 | @synthesize refers; 26 | @synthesize height_reference; 27 | @synthesize appClient; 28 | @synthesize width_bubble; 29 | 30 | - (id)initWithParameters:(int)nid 31 | andImg:(NSString *)nimg 32 | andAuthor:(NSString *)nauthor 33 | andAuthorID:(int)nauthorid 34 | andContent:(NSString *)nContent 35 | andPubDate:(NSString *)nPubDate 36 | andReplies:(NSMutableArray *)array 37 | andRefers:(NSMutableArray *)nrefers 38 | andAppClient:(int)nappclient 39 | { 40 | Comment *c = [[Comment alloc] init]; 41 | c._id = nid; 42 | c.img = nimg; 43 | c.author = nauthor; 44 | c.authorid = nauthorid; 45 | c.content = nContent; 46 | c.pubDate = nPubDate; 47 | c.replies = array; 48 | c.refers = nrefers; 49 | c.appClient = nappclient; 50 | c.width_bubble = 0; 51 | if (nrefers != nil && nrefers.count > 0) { 52 | UIView * referView = [Tool getReferView:nrefers]; 53 | c.height_reference = referView.frame.size.height + 7; 54 | } 55 | else { 56 | c.height_reference = 0; 57 | } 58 | 59 | UITextView *txt = [[UITextView alloc] initWithFrame:CGRectMake(170, 474, 260, 922)]; 60 | c.height = [Tool getTextViewHeight:txt andUIFont:[UIFont fontWithName:@"arial" size:14.0] andText:c.content]; 61 | if (c.replies && [c.replies count] > 0 ) { 62 | c.height += 13+19+[c.replies count]*35; 63 | } 64 | else 65 | { 66 | c.height += 13; 67 | } 68 | 69 | return c; 70 | } 71 | 72 | @end 73 | -------------------------------------------------------------------------------- /oschina/CommentRefer.h: -------------------------------------------------------------------------------- 1 | // 2 | // CommentRefer.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-4-28. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface CommentRefer : NSObject 12 | 13 | @property (copy,nonatomic) NSString * title; 14 | @property (copy,nonatomic) NSString * body; 15 | 16 | - (id)initWithParamters:(NSString *)ntitle andBody:(NSString *)nbody; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /oschina/CommentRefer.m: -------------------------------------------------------------------------------- 1 | // 2 | // CommentRefer.m 3 | // oschina 4 | // 5 | // Created by wangjun on 12-4-28. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "CommentRefer.h" 10 | 11 | @implementation CommentRefer 12 | 13 | @synthesize title; 14 | @synthesize body; 15 | 16 | - (id)initWithParamters:(NSString *)ntitle andBody:(NSString *)nbody 17 | { 18 | CommentRefer *c = [CommentRefer new]; 19 | c.title = ntitle; 20 | c.body = nbody; 21 | return c; 22 | } 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /oschina/DataSingleton.h: -------------------------------------------------------------------------------- 1 | // 2 | // DataSingleton.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-5. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import "LoadingCell.h" 12 | 13 | @interface DataSingleton : NSObject 14 | 15 | #pragma 单例模式 16 | + (DataSingleton *) Instance; 17 | + (id)allocWithZone:(NSZone *)zone; 18 | 19 | //返回标示正在加载的选项 20 | - (UITableViewCell *)getLoadMoreCell:(UITableView *)tableView 21 | andIsLoadOver:(BOOL)isLoadOver 22 | andLoadOverString:(NSString *)loadOverString 23 | andLoadingString:(NSString *)loadingString 24 | andIsLoading:(BOOL)isLoading; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /oschina/DataSingleton.m: -------------------------------------------------------------------------------- 1 | // 2 | // DataSingleton.m 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-5. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "DataSingleton.h" 10 | #import 11 | 12 | @implementation DataSingleton 13 | 14 | - (UITableViewCell *)getLoadMoreCell:(UITableView *)tableView 15 | andIsLoadOver:(BOOL)isLoadOver 16 | andLoadOverString:(NSString *)loadOverString 17 | andLoadingString:(NSString *)loadingString 18 | andIsLoading:(BOOL)isLoading 19 | { 20 | LoadingCell * cell = [tableView dequeueReusableCellWithIdentifier:@"loadingCell"]; 21 | if (!cell) { 22 | NSArray *objects = [[NSBundle mainBundle] loadNibNamed:@"LoadingCell" owner:self options:nil]; 23 | for (NSObject *o in objects) { 24 | if ([o isKindOfClass:[LoadingCell class]]) { 25 | cell = (LoadingCell *)o; 26 | break; 27 | } 28 | } 29 | } 30 | cell.lbl.font = [UIFont boldSystemFontOfSize:21.0]; 31 | cell.lbl.text = isLoadOver ? loadOverString : loadingString; 32 | if (isLoading) { 33 | cell.loading.hidden = NO; 34 | [cell.loading startAnimating]; 35 | } 36 | else 37 | { 38 | cell.loading.hidden = YES; 39 | [cell.loading stopAnimating]; 40 | } 41 | return cell; 42 | } 43 | 44 | #pragma 单例模式定义 45 | static DataSingleton * instance = nil; 46 | +(DataSingleton *) Instance 47 | { 48 | @synchronized(self) 49 | { 50 | if(nil == instance) 51 | { 52 | [self new]; 53 | } 54 | } 55 | return instance; 56 | } 57 | +(id)allocWithZone:(NSZone *)zone 58 | { 59 | @synchronized(self) 60 | { 61 | if(instance == nil) 62 | { 63 | instance = [super allocWithZone:zone]; 64 | return instance; 65 | } 66 | } 67 | return nil; 68 | } 69 | @end 70 | -------------------------------------------------------------------------------- /oschina/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/Default-568h@2x.png -------------------------------------------------------------------------------- /oschina/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/Default.png -------------------------------------------------------------------------------- /oschina/DynamicBaseView.h: -------------------------------------------------------------------------------- 1 | // 2 | // DynamicBaseView.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-6. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "ActivesView.h" 11 | 12 | @interface DynamicBaseView : UIViewController 13 | @property (strong, nonatomic) IBOutlet UIView *viewMain; 14 | 15 | @property (strong, nonatomic) ActivesView * atme; 16 | @property (strong, nonatomic) ActivesView * activesView; 17 | - (IBAction)selector_ATme:(id)sender; 18 | - (IBAction)selector_Actives:(id)sender; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /oschina/FTCoreTextView.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/FTCoreTextView.h -------------------------------------------------------------------------------- /oschina/Favorite.h: -------------------------------------------------------------------------------- 1 | // 2 | // Favorite.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-5-4. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface Favorite : NSObject 12 | 13 | @property int objid; 14 | @property int type; 15 | @property (nonatomic,copy) NSString * title; 16 | @property (nonatomic,copy) NSString * url; 17 | 18 | - (id)initWithParameters:(int)nobjid andType:(int)nType andTitle:(NSString *)ntitle andUrl:(NSString *)nurl; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /oschina/Favorite.m: -------------------------------------------------------------------------------- 1 | // 2 | // Favorite.m 3 | // oschina 4 | // 5 | // Created by wangjun on 12-5-4. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "Favorite.h" 10 | 11 | @implementation Favorite 12 | 13 | @synthesize objid; 14 | @synthesize type; 15 | @synthesize title; 16 | @synthesize url; 17 | 18 | - (id)initWithParameters:(int)nobjid andType:(int)nType andTitle:(NSString *)ntitle andUrl:(NSString *)nurl 19 | { 20 | Favorite *f = [[Favorite alloc] init]; 21 | f.objid = nobjid; 22 | f.type = nType; 23 | f.title = ntitle; 24 | f.url = nurl; 25 | return f; 26 | } 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /oschina/FavoriteCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // FavoriteCell.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-5-15. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface FavoriteCell : UITableViewCell 12 | @property (strong, nonatomic) IBOutlet UILabel *lblTitle; 13 | //长按删除元素用 14 | @property (nonatomic,assign) id delegate; 15 | -(void)initGR; 16 | @end 17 | -------------------------------------------------------------------------------- /oschina/FavoriteCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // FavoriteCell.m 3 | // oschina 4 | // 5 | // Created by wangjun on 12-5-15. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "FavoriteCell.h" 10 | 11 | @implementation FavoriteCell 12 | @synthesize lblTitle; 13 | @synthesize delegate; 14 | 15 | -(void)initGR 16 | { 17 | UILongPressGestureRecognizer *longPressGR = [[ UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(handleLongPress:)]; 18 | longPressGR.minimumPressDuration = 0.7; 19 | [self addGestureRecognizer:longPressGR]; 20 | } 21 | 22 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated 23 | { 24 | [super setSelected:selected animated:animated]; 25 | } 26 | 27 | -(BOOL)canBecomeFirstResponder 28 | { 29 | return YES; 30 | } 31 | -(void)handleLongPress:(UILongPressGestureRecognizer *)recognizer 32 | { 33 | if([self isHighlighted]) 34 | { 35 | [[self delegate] performSelector:@selector(showMenu:) withObject:self]; 36 | } 37 | } 38 | - (void)delete:(id)sender 39 | { 40 | [[self delegate] performSelector:@selector(deleteRow:) withObject:self]; 41 | } 42 | -(BOOL)canPerformAction:(SEL)action withSender:(id)sender 43 | { 44 | // if (action == @selector(cut:)) 45 | // { 46 | // return NO; 47 | // } 48 | // else if(action == @selector(copy:)) 49 | // { 50 | // return NO; 51 | // } 52 | // else if(action == @selector(paste:)) 53 | // { 54 | // return NO; 55 | // } 56 | // else if(action == @selector(select:)) 57 | // { 58 | // return NO; 59 | // } 60 | // else if(action == @selector(selectAll:)) 61 | // { 62 | // return NO; 63 | // } 64 | // else 65 | if(action == @selector(delete:)) 66 | { 67 | return YES; 68 | } 69 | else 70 | { 71 | return [super canPerformAction:action withSender:sender]; 72 | } 73 | } 74 | @end 75 | -------------------------------------------------------------------------------- /oschina/FavoritesView.h: -------------------------------------------------------------------------------- 1 | // 2 | // FavoritesView.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-5-9. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "Favorite.h" 11 | #import "FavoriteCell.h" 12 | #import "ASIHTTPRequest.h" 13 | #import "EGORefreshTableHeaderView.h" 14 | 15 | @interface FavoritesView : UIViewController 16 | { 17 | NSMutableArray * favorites; 18 | BOOL isLoading; 19 | BOOL isLoadOver; 20 | int allCount; 21 | 22 | //下拉刷新 23 | EGORefreshTableHeaderView *_refreshHeaderView; 24 | BOOL _reloading; 25 | } 26 | @property (strong, nonatomic) IBOutlet UISegmentedControl *segmentType; 27 | @property (strong, nonatomic) IBOutlet UITableView *tableFavorites; 28 | - (IBAction)segementChanged:(id)sender; 29 | 30 | @property int catalog; 31 | -(void)reload:(BOOL)noRefresh; 32 | 33 | -(void)clear; 34 | //下拉刷新 35 | -(void)refresh; 36 | -(void)reloadTableViewDataSource; 37 | -(void)doneLoadingTableViewData; 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /oschina/Friend.h: -------------------------------------------------------------------------------- 1 | // 2 | // Friend.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-5-9. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface Friend : NSObject 12 | 13 | @property (copy,nonatomic) NSString * name; 14 | @property int userID; 15 | @property (copy,nonatomic) NSString * portrait; 16 | @property (copy,nonatomic) NSString * expertise; 17 | @property BOOL isMale; 18 | @property (retain,nonatomic) UIImage * imgData; 19 | 20 | - (id)initWithParameters:(NSString *)newName 21 | andUID:(int)newUID 22 | andPortrait:(NSString *)nportrait 23 | andExpertise:(NSString *)nexpertise 24 | andMale:(BOOL)nisMale; 25 | @end 26 | -------------------------------------------------------------------------------- /oschina/Friend.m: -------------------------------------------------------------------------------- 1 | // 2 | // Friend.m 3 | // oschina 4 | // 5 | // Created by wangjun on 12-5-9. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "Friend.h" 10 | 11 | @implementation Friend 12 | 13 | @synthesize name; 14 | @synthesize userID; 15 | @synthesize portrait; 16 | @synthesize expertise; 17 | @synthesize isMale; 18 | @synthesize imgData; 19 | 20 | - (id)initWithParameters:(NSString *)newName 21 | andUID:(int)newUID 22 | andPortrait:(NSString *)nportrait 23 | andExpertise:(NSString *)nexpertise 24 | andMale:(BOOL)nisMale 25 | { 26 | Friend * f = [[Friend alloc] init]; 27 | f.name = newName; 28 | f.userID = newUID; 29 | f.portrait = nportrait; 30 | f.expertise = nexpertise; 31 | f.isMale = nisMale; 32 | return f; 33 | } 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /oschina/FriendCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // FriendCell.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-5-11. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface FriendCell : UITableViewCell 12 | 13 | @property (strong, nonatomic) IBOutlet UIImageView *imgPortrait; 14 | @property (strong, nonatomic) IBOutlet UIImageView *imgGender; 15 | @property (strong, nonatomic) IBOutlet UILabel *lblName; 16 | @property (strong, nonatomic) IBOutlet UITextView *txtExpertise; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /oschina/FriendCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // FriendCell.m 3 | // oschina 4 | // 5 | // Created by wangjun on 12-5-11. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "FriendCell.h" 10 | 11 | @implementation FriendCell 12 | 13 | @synthesize imgPortrait; 14 | @synthesize imgGender; 15 | @synthesize lblName; 16 | @synthesize txtExpertise; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /oschina/FriendsView.h: -------------------------------------------------------------------------------- 1 | // 2 | // FriendsView.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-5-11. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "Friend.h" 11 | #import "MBProgressHUD.h" 12 | #import "FriendCell.h" 13 | 14 | @interface FriendsView : UIViewController 15 | { 16 | NSMutableArray * friends; 17 | BOOL isLoading; 18 | BOOL isLoadOver; 19 | 20 | //下拉刷新 21 | EGORefreshTableHeaderView *_refreshHeaderView; 22 | BOOL _reloading; 23 | } 24 | 25 | @property int fansCount; 26 | @property int followersCount; 27 | 28 | @property (strong, nonatomic) IBOutlet UISegmentedControl *segement; 29 | - (IBAction)segementChanged:(id)sender; 30 | @property (strong, nonatomic) IBOutlet UITableView *tableFriends; 31 | @property BOOL isFansType; 32 | 33 | //异步加载图片专用 34 | @property (nonatomic, retain) NSMutableDictionary *imageDownloadsInProgress; 35 | -(void)startIconDownload:(ImgRecord *)imgRecord forIndexPath:(NSIndexPath *)indexPath; 36 | -(void)reloadType; 37 | -(void)reload:(BOOL)noRefresh; 38 | -(void)clear; 39 | 40 | //下拉刷新 41 | -(void)refresh; 42 | -(void)reloadTableViewDataSource; 43 | -(void)doneLoadingTableViewData; 44 | @end 45 | -------------------------------------------------------------------------------- /oschina/Graphics/photo_cropper_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/Graphics/photo_cropper_bg.png -------------------------------------------------------------------------------- /oschina/Graphics/photo_cropper_bg@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/Graphics/photo_cropper_bg@2x.png -------------------------------------------------------------------------------- /oschina/Graphics/photo_cropper_rect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/Graphics/photo_cropper_rect.png -------------------------------------------------------------------------------- /oschina/Graphics/photo_cropper_rect@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/Graphics/photo_cropper_rect@2x.png -------------------------------------------------------------------------------- /oschina/Graphics/photo_cropper_rect_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/Graphics/photo_cropper_rect_on.png -------------------------------------------------------------------------------- /oschina/Graphics/photo_cropper_rect_on@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/Graphics/photo_cropper_rect_on@2x.png -------------------------------------------------------------------------------- /oschina/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/Icon.png -------------------------------------------------------------------------------- /oschina/Icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/Icon@2x.png -------------------------------------------------------------------------------- /oschina/Images/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/Images/.DS_Store -------------------------------------------------------------------------------- /oschina/Images/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/Images/close.png -------------------------------------------------------------------------------- /oschina/Images/close@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/Images/close@2x.png -------------------------------------------------------------------------------- /oschina/ImgRecord.h: -------------------------------------------------------------------------------- 1 | // 2 | // ImgRecord.h 3 | // NextApp 4 | // 5 | // Created by wangjun on 12-2-22. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ImgRecord : NSObject 12 | 13 | @property (nonatomic,copy) NSString *url; 14 | @property (nonatomic,retain) UIImage *img; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /oschina/ImgRecord.m: -------------------------------------------------------------------------------- 1 | // 2 | // ImgRecord.m 3 | // NextApp 4 | // 5 | // Created by wangjun on 12-2-22. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "ImgRecord.h" 10 | 11 | @implementation ImgRecord 12 | @synthesize img; 13 | @synthesize url; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /oschina/JSNotifier.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2012 Jonah Siegle 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #import 18 | 19 | #import 20 | 21 | 22 | @interface JSNotifier : UIView{ 23 | 24 | @protected 25 | UILabel *_txtLabel; 26 | } 27 | 28 | 29 | - (id)initWithTitle:(NSString *)title; 30 | 31 | - (void)setAccessoryView:(UIView *)view animated:(BOOL)animated; 32 | 33 | - (void)setTitle:(id)title animated:(BOOL)animated; 34 | 35 | - (void)show; 36 | - (void)showFor:(float)time; 37 | 38 | - (void)hide; 39 | - (void)hideIn:(float)seconds; 40 | 41 | @property (nonatomic, strong) UIView *accessoryView; 42 | @property (nonatomic, strong) NSString *title; 43 | 44 | @end 45 | 46 | -------------------------------------------------------------------------------- /oschina/LoadingCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // LoadingCell.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-5-8. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface LoadingCell : UITableViewCell 12 | 13 | @property (strong, nonatomic) IBOutlet UILabel *lbl; 14 | @property (strong, nonatomic) IBOutlet UIActivityIndicatorView *loading; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /oschina/LoadingCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // LoadingCell.m 3 | // oschina 4 | // 5 | // Created by wangjun on 12-5-8. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "LoadingCell.h" 10 | 11 | @implementation LoadingCell 12 | 13 | @synthesize lbl; 14 | @synthesize loading; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /oschina/LoginView.h: -------------------------------------------------------------------------------- 1 | // 2 | // LoginView.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-8. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "Tool.h" 11 | #import "ProfileBase.h" 12 | #import "MessageView.h" 13 | #import "Config.h" 14 | #import "MBProgressHUD.h" 15 | #import "MyThread.h" 16 | 17 | @interface LoginView : UIViewController 18 | { 19 | ASIFormDataRequest *request; 20 | } 21 | @property (strong, nonatomic) IBOutlet UITextField *txt_Name; 22 | @property (strong, nonatomic) IBOutlet UITextField *txt_Pwd; 23 | @property (strong, nonatomic) IBOutlet UISwitch *switch_Remember; 24 | @property BOOL isPopupByNotice; 25 | @property (strong, nonatomic) IBOutlet UIWebView *webView; 26 | 27 | - (IBAction)click_Login:(id)sender; 28 | - (IBAction)textEnd:(id)sender; 29 | - (IBAction)backgrondTouch:(id)sender; 30 | - (void)analyseUserInfo:(NSString *)xml; 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /oschina/Message.h: -------------------------------------------------------------------------------- 1 | // 2 | // Message.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-8. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface Message : NSObject 13 | 14 | @property int _id; 15 | @property (copy,nonatomic) NSString * sender; 16 | @property int senderID; 17 | @property (copy,nonatomic) NSString * content; 18 | @property (copy,nonatomic) NSString * fromNowOn; 19 | @property (retain,nonatomic) UIImage * imgData; 20 | @property (copy,nonatomic) NSString * img; 21 | @property int friendid; 22 | @property (copy,nonatomic) NSString * friendName; 23 | @property BOOL isEnableDel; 24 | @property int count; 25 | @property int height; 26 | 27 | - (id)initWithParameter:(int)newID 28 | andSender:(NSString *)sender 29 | andSenderID:(int)nsenderID 30 | andContent:(NSString *)newContent 31 | andFromNowOn:(NSString *)time 32 | andImg:(NSString *)nImg 33 | andFriendid:(int)nfriendid 34 | andFriendName:(NSString *)nfriendName 35 | andCount:(int)nCount; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /oschina/Message.m: -------------------------------------------------------------------------------- 1 | // 2 | // Message.m 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-8. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "Message.h" 10 | #import "Tool.h" 11 | 12 | @implementation Message 13 | @synthesize _id; 14 | @synthesize sender; 15 | @synthesize senderID; 16 | @synthesize content; 17 | @synthesize fromNowOn; 18 | @synthesize imgData; 19 | @synthesize img; 20 | @synthesize friendid; 21 | @synthesize friendName; 22 | @synthesize count; 23 | @synthesize isEnableDel; 24 | @synthesize height; 25 | 26 | - (id)initWithParameter:(int)newID 27 | andSender:(NSString *)nsender 28 | andSenderID:(int)nsenderID 29 | andContent:(NSString *)newContent 30 | andFromNowOn:(NSString *)time 31 | andImg:(NSString *)nImg 32 | andFriendid:(int)nfriendid 33 | andFriendName:(NSString *)nfriendName 34 | andCount:(int)nCount 35 | { 36 | Message *m = [Message new]; 37 | m._id = newID; 38 | m.sender = nsender; 39 | m.senderID = nsenderID; 40 | m.content = newContent; 41 | m.fromNowOn = time; 42 | m.img = nImg; 43 | m.friendid = nfriendid; 44 | m.friendName = nfriendName; 45 | m.count = nCount; 46 | 47 | UITextView *txt = [[UITextView alloc] initWithFrame:CGRectMake(166, 252, 255, 503)]; 48 | 49 | m.height = [Tool getTextViewHeight:txt andUIFont:[UIFont fontWithName:@"arial" size:14.0] andText:[NSString stringWithFormat:@"发给%@:\n%@",m.friendName, m.content]]; 50 | 51 | return m; 52 | } 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /oschina/MessageCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // MessageCell.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-13. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MessageCell : UITableViewCell 12 | 13 | @property (strong, nonatomic) IBOutlet UITextView *txtContent; 14 | @property (strong, nonatomic) IBOutlet UILabel *lblFromNowOn; 15 | @property (strong, nonatomic) IBOutlet UILabel *lblCount; 16 | @property (strong, nonatomic) IBOutlet UIImageView *img; 17 | @property (strong, nonatomic) IBOutlet UILabel *lblName; 18 | //长按删除元素用 19 | @property (nonatomic,assign) id delegate; 20 | - (void)initGR; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /oschina/MessageSystemPub.h: -------------------------------------------------------------------------------- 1 | // 2 | // MessageSystemPub.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-13. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "ApiError.h" 11 | #import "MessageSystemView.h" 12 | 13 | @interface MessageSystemPub : UIViewController 14 | { 15 | NSString * commentBeforeLogin; 16 | } 17 | 18 | - (IBAction)clickComment:(id)sender; 19 | - (IBAction)backgroundDown:(id)sender; 20 | @property (strong, nonatomic) IBOutlet UILabel *lblState1; 21 | @property (strong, nonatomic) IBOutlet UISwitch *switchRepost; 22 | @property (strong,nonatomic) MessageSystemView * parent; 23 | @property (retain,nonatomic) NSString * btnPubTitle; 24 | - (IBAction)changeIsPostToMyZone:(id)sender; 25 | @property (strong, nonatomic) IBOutlet UILabel *lbl_HeadTitle; 26 | @property (strong, nonatomic) IBOutlet UITextView *txtContent; 27 | 28 | @property int catalog; 29 | @property int parentID; 30 | 31 | @property BOOL isListIn; 32 | - (IBAction)clickDidOnExit:(id)sender; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /oschina/MessageView.h: -------------------------------------------------------------------------------- 1 | // 2 | // MessageView.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-8. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "Message.h" 11 | #import "MessageSystemView.h" 12 | #import "MessageCell.h" 13 | #import "PubMessage.h" 14 | #import "Tool.h" 15 | #import "ApiError.h" 16 | #import "MyBubbleView.h" 17 | 18 | #define FetchCount 10; 19 | 20 | @interface MessageView : UIViewController 21 | { 22 | NSMutableArray * msgs; 23 | BOOL isLoading; 24 | BOOL isLoadOver; 25 | 26 | //下拉刷新 27 | EGORefreshTableHeaderView *_refreshHeaderView; 28 | BOOL _reloading; 29 | } 30 | @property (strong, nonatomic) IBOutlet UITableView *tableMsgs; 31 | - (void)reload:(BOOL)noRefresh; 32 | 33 | @property BOOL isLoginJustNow; 34 | 35 | //异步加载图片专用 36 | @property (nonatomic, retain) NSMutableDictionary *imageDownloadsInProgress; 37 | - (void)startIconDownload:(ImgRecord *)imgRecord forIndexPath:(NSIndexPath *)indexPath; 38 | 39 | //下拉刷新 40 | - (void)clear; 41 | - (void)refresh; 42 | - (void)reloadTableViewDataSource; 43 | - (void)doneLoadingTableViewData; 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /oschina/MsgCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // MsgCell.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-14. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MsgCell : UITableViewCell 12 | @property (strong, nonatomic) IBOutlet UIImageView *img; 13 | @property (strong, nonatomic) IBOutlet UILabel *lbl_Title; 14 | @property (strong, nonatomic) IBOutlet UITextView *txt_Content; 15 | 16 | @property (strong, nonatomic) UIView * myView; 17 | 18 | @property (retain, nonatomic) UIView * referView; 19 | 20 | //长按删除元素用 21 | @property (nonatomic,assign) id delegate; 22 | -(void)initGR; 23 | @end 24 | -------------------------------------------------------------------------------- /oschina/MyBubbleView.h: -------------------------------------------------------------------------------- 1 | // 2 | // MyBubbleView.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-8-28. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "ChatPopView.h" 11 | 12 | @interface MyBubbleView : UIViewController 13 | { 14 | BOOL isLoading; 15 | BOOL isLoadOver; 16 | NSMutableArray * comments; 17 | int allCount; 18 | } 19 | 20 | @property (strong, nonatomic) IBOutlet UITableView *tableBubbles; 21 | @property int friendID; 22 | @property (copy,nonatomic) NSString * friendName; 23 | 24 | - (void)reload; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /oschina/MyInfoCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // MyInfoCell.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-5-15. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MyInfoCell : UITableViewCell 12 | 13 | @property (strong, nonatomic) IBOutlet UILabel *lblTitle; 14 | @property (strong, nonatomic) IBOutlet UITextView *txtContent; 15 | @property (strong, nonatomic) IBOutlet UILabel *lblContent; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /oschina/MyInfoCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // MyInfoCell.m 3 | // oschina 4 | // 5 | // Created by wangjun on 12-5-15. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "MyInfoCell.h" 10 | 11 | @implementation MyInfoCell 12 | 13 | @synthesize lblTitle; 14 | @synthesize txtContent; 15 | @synthesize lblContent; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /oschina/MyPortraitCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // MyPortraitCell.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-5-22. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MyPortraitCell : UITableViewCell 12 | 13 | @property (strong, nonatomic) IBOutlet UILabel *lblName; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /oschina/MyPortraitCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // MyPortraitCell.m 3 | // oschina 4 | // 5 | // Created by wangjun on 12-5-22. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "MyPortraitCell.h" 10 | 11 | @implementation MyPortraitCell 12 | 13 | @synthesize lblName; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /oschina/MyThread.h: -------------------------------------------------------------------------------- 1 | // 2 | // MyThread.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-5-15. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "OSCNotice.h" 11 | #import 12 | #import "ASIHTTPRequest.h" 13 | #import "Config.h" 14 | #import "TweetPubCache.h" 15 | 16 | @interface MyThread : NSObject 17 | { 18 | //明天用 NSTimer 控件 19 | NSTimer * timer; 20 | 21 | BOOL isRunning; 22 | } 23 | 24 | - (void)startNotice; 25 | - (void)startPubTweet:(NSString *)msg andImg:(NSData *)imgData; 26 | - (void)startUpdatePortrait:(NSData *)imgData; 27 | 28 | @property (strong, nonatomic) UIView * mainView; 29 | 30 | +(MyThread *)Instance; 31 | +(id)allocWithZone:(NSZone *)zone; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /oschina/MyView.h: -------------------------------------------------------------------------------- 1 | // 2 | // MyView.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-5-15. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "EGOImageView.h" 11 | #import "FavoritesView.h" 12 | #import "FriendsView.h" 13 | #import "MyInfoCell.h" 14 | #import "MyPortraitCell.h" 15 | #import "SSPhotoCropperViewController.h" 16 | 17 | @interface MyView : UIViewController 18 | { 19 | NSArray * first; 20 | NSArray * second; 21 | NSArray * third; 22 | 23 | int fansCount; 24 | int followersCount; 25 | } 26 | 27 | @property (strong,nonatomic) EGOImageView * egoImgView; 28 | - (IBAction)clickUpdatePortrait:(id)sender; 29 | 30 | -(void)reload; 31 | @property (strong, nonatomic) IBOutlet UIImageView *imgGender; 32 | @property (strong, nonatomic) IBOutlet UILabel *lblName; 33 | @property (strong, nonatomic) IBOutlet UITableView *tableInformation; 34 | 35 | @property (retain,nonatomic) NSArray * settings; 36 | @property (retain,nonatomic) NSMutableDictionary * settingsInSection; 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /oschina/NSData+Base64.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSData+Base64.m 3 | // Gurpartap Singh 4 | // 5 | // Created by Gurpartap Singh on 06/05/12. 6 | // Copyright (c) 2012 Gurpartap Singh. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class NSString; 12 | 13 | @interface NSData (Base64Additions) 14 | 15 | + (NSData *)base64DataFromString:(NSString *)string; 16 | 17 | @end -------------------------------------------------------------------------------- /oschina/NSString+Base64.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+Base64.h 3 | // Gurpartap Singh 4 | // 5 | // Created by Gurpartap Singh on 06/05/12. 6 | // Copyright (c) 2012 Gurpartap Singh. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSString (Base64Additions) 12 | 13 | + (NSString *)base64StringFromData:(NSData *)data length:(int)length; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /oschina/NdUncaughtExceptionHandler.h: -------------------------------------------------------------------------------- 1 | // 2 | // NdUncaughtExceptionHandler.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-7-30. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NdUncaughtExceptionHandler : NSObject 12 | 13 | + (void)setDefaultHandler; 14 | + (NSUncaughtExceptionHandler *)getHandler; 15 | + (void)TakeException:(NSException *) exception; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /oschina/News.h: -------------------------------------------------------------------------------- 1 | // 2 | // News.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-7. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface News : NSObject 12 | 13 | @property int _id; 14 | @property (nonatomic,copy) NSString * title; 15 | @property (nonatomic,copy) NSString * url; 16 | @property (nonatomic,copy) NSString * author; 17 | @property int authorid; 18 | @property (nonatomic,copy) NSString * pubDate; 19 | @property int commentCount; 20 | @property int newsType; 21 | @property (nonatomic,copy) NSString * attachment; 22 | @property int authoruid2; 23 | 24 | - (id)initWithParameters:(int)newID 25 | andTitle:(NSString *)newTitle 26 | andUrl:(NSString *)newUrl 27 | andAuthor:(NSString *)nAuthor 28 | andAuthorID:(int)authorID 29 | andPubDate:(NSString *)nPubDate 30 | andCommentCount:(int)nCommentCount; 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /oschina/News.m: -------------------------------------------------------------------------------- 1 | // 2 | // News.m 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-7. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "News.h" 10 | 11 | @implementation News 12 | 13 | @synthesize _id; 14 | @synthesize title; 15 | @synthesize url; 16 | @synthesize author; 17 | @synthesize authorid; 18 | @synthesize pubDate; 19 | @synthesize commentCount; 20 | @synthesize newsType; 21 | @synthesize attachment; 22 | @synthesize authoruid2; 23 | 24 | - (id)initWithParameters:(int)newID 25 | andTitle:(NSString *)newTitle 26 | andUrl:(NSString *)newUrl 27 | andAuthor:(NSString *)nAuthor 28 | andAuthorID:(int)nauthorID 29 | andPubDate:(NSString *)nPubDate 30 | andCommentCount:(int)nCommentCount 31 | { 32 | News *n = [[News alloc] init]; 33 | n._id = newID; 34 | n.title = newTitle; 35 | n.url = newUrl; 36 | n.author = nAuthor; 37 | n.authorid = nauthorID; 38 | n.pubDate = nPubDate; 39 | n.commentCount = nCommentCount; 40 | return n; 41 | } 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /oschina/NewsBase.h: -------------------------------------------------------------------------------- 1 | // 2 | // NewsBase.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-12. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "NewsView.h" 11 | 12 | @interface NewsBase : UIViewController 13 | 14 | @property (strong,nonatomic) UISegmentedControl * segment_title; 15 | @property (strong,nonatomic) NewsView * newsView; 16 | 17 | - (NSString *)getSegmentTitle; 18 | - (void)myInit; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /oschina/NewsCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // NewsCell.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-13. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NewsCell : UITableViewCell 12 | 13 | @property (strong, nonatomic) IBOutlet UILabel *lblTitle; 14 | @property (strong, nonatomic) IBOutlet UILabel *lblAuthor; 15 | //长按删除元素用 16 | @property (nonatomic,assign) id delegate; 17 | - (void)initGR; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /oschina/NewsCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // NewsCell.m 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-13. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "NewsCell.h" 10 | 11 | @implementation NewsCell 12 | @synthesize lblTitle; 13 | @synthesize lblAuthor; 14 | @synthesize delegate; 15 | 16 | -(void)initGR 17 | { 18 | UILongPressGestureRecognizer *longPressGR = [[ UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(handleLongPress:)]; 19 | longPressGR.minimumPressDuration = 0.7; 20 | [self addGestureRecognizer:longPressGR]; 21 | } 22 | 23 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated 24 | { 25 | [super setSelected:selected animated:animated]; 26 | } 27 | 28 | - (BOOL)canBecomeFirstResponder 29 | { 30 | return YES; 31 | } 32 | - (void)handleLongPress:(UILongPressGestureRecognizer *)recognizer 33 | { 34 | if([self isHighlighted]) 35 | { 36 | [[self delegate] performSelector:@selector(showMenu:) withObject:self]; 37 | } 38 | } 39 | - (void)delete:(id)sender 40 | { 41 | [[self delegate] performSelector:@selector(deleteRow:) withObject:self]; 42 | } 43 | - (BOOL)canPerformAction:(SEL)action withSender:(id)sender 44 | { 45 | if(action == @selector(delete:)) 46 | { 47 | return YES; 48 | } 49 | else 50 | { 51 | return [super canPerformAction:action withSender:sender]; 52 | } 53 | } 54 | 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /oschina/NewsDetail.h: -------------------------------------------------------------------------------- 1 | // 2 | // NewsDetail.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-12. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "SingleNews.h" 11 | #import "ShareObject.h" 12 | #import "Notification_CommentCount.h" 13 | #import "Tool.h" 14 | #import "MessageSystemPub.h" 15 | #import "SingleNews.h" 16 | #import "RegexKitLite.h" 17 | #import "MBProgressHUD.h" 18 | 19 | @interface NewsDetail : UIViewController 20 | { 21 | UIBarButtonItem * btnFavorite; 22 | } 23 | 24 | @property (strong, nonatomic) IBOutlet UIWebView *webView; 25 | @property BOOL isNextPage; 26 | @property int newsID; 27 | @property (retain,nonatomic) SingleNews * singleNews; 28 | 29 | - (void)loadData:(SingleNews *)n; 30 | - (void)refreshFavorite:(SingleNews *)n; 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /oschina/NewsView.h: -------------------------------------------------------------------------------- 1 | // 2 | // NewsView.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-6. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | #import 9 | #import "News.h" 10 | #import "NewsDetail.h" 11 | #import "ShareView.h" 12 | #import "MessageSystemView.h" 13 | #import "NewsCell.h" 14 | #import "NewsBase.h" 15 | #import "ASIProgressDelegate.h" 16 | #import "MBProgressHUD.h" 17 | #import "BlogUnit.h" 18 | 19 | //下拉刷新的委托 20 | @interface NewsView : UIViewController 21 | { 22 | NSMutableArray * news; 23 | BOOL isLoading; 24 | BOOL isLoadOver; 25 | int allCount; 26 | 27 | //下拉刷新 28 | EGORefreshTableHeaderView *_refreshHeaderView; 29 | BOOL _reloading; 30 | } 31 | @property (strong, nonatomic) IBOutlet UITableView *tableNews; 32 | @property int catalog; 33 | - (void)reloadType:(int)ncatalog; 34 | - (void)reload:(BOOL)noRefresh; 35 | 36 | //清空 37 | - (void)clear; 38 | 39 | //下拉刷新 40 | - (void)refresh; 41 | - (void)reloadTableViewDataSource; 42 | - (void)doneLoadingTableViewData; 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /oschina/Notification_CommentCount.h: -------------------------------------------------------------------------------- 1 | // 2 | // Notification_CommentCount.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-19. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface Notification_CommentCount : NSObject 12 | 13 | @property (retain,nonatomic) id attachment; 14 | @property int commentCount; 15 | 16 | - (id)initWithParameters:(id)nattachment andCommentCount:(int)ncommentCount; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /oschina/Notification_CommentCount.m: -------------------------------------------------------------------------------- 1 | // 2 | // Notification_CommentCount.m 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-19. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "Notification_CommentCount.h" 10 | 11 | @implementation Notification_CommentCount 12 | 13 | @synthesize attachment; 14 | @synthesize commentCount; 15 | 16 | - (id)initWithParameters:(id)nattachment andCommentCount:(int)ncommentCount 17 | { 18 | Notification_CommentCount *notification = [[Notification_CommentCount alloc] init]; 19 | notification.attachment = nattachment; 20 | notification.commentCount = ncommentCount; 21 | return notification; 22 | } 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /oschina/NotifyCheck@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/NotifyCheck@2x.png -------------------------------------------------------------------------------- /oschina/NotifyX@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/NotifyX@2x.png -------------------------------------------------------------------------------- /oschina/OSAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // OSAppDelegate.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-1. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "SettingView.h" 11 | #import "DataSingleton.h" 12 | #import "CheckNetwork.h" 13 | #import "PostBase.h" 14 | #import "ProfileBase.h" 15 | #import "NewsBase.h" 16 | #import "TweetBase2.h" 17 | #import "SettingView.h" 18 | #import "NdUncaughtExceptionHandler.h" 19 | 20 | @class ProfileBase; 21 | @interface OSAppDelegate : UIResponder 22 | { 23 | int m_lastTabIndex; 24 | } 25 | 26 | @property (strong, nonatomic) UIWindow *window; 27 | @property (strong, nonatomic) UITabBarController *tabBarController; 28 | 29 | @property (strong, nonatomic) NewsBase * newsBase; 30 | @property (strong, nonatomic) PostBase * postBase; 31 | @property (strong, nonatomic) TweetBase2 * tweetBase; 32 | @property (strong, nonatomic) ProfileBase * profileBase; 33 | @property (strong, nonatomic) SettingView * settingView; 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /oschina/OSCNotice.h: -------------------------------------------------------------------------------- 1 | // 2 | // OSCNotice.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-27. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface OSCNotice : NSObject 12 | 13 | @property int atmeCount; 14 | @property int msgCount; 15 | @property int reviewCount; 16 | @property int newFansCount; 17 | 18 | - (id)initWithParameters:(int)natmeCount andMsg:(int)nmsgCount andReview:(int)nreviewCount andFans:(int)nnewFansCount; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /oschina/OSCNotice.m: -------------------------------------------------------------------------------- 1 | // 2 | // OSCNotice.m 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-27. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "OSCNotice.h" 10 | 11 | @implementation OSCNotice 12 | 13 | @synthesize atmeCount; 14 | @synthesize msgCount; 15 | @synthesize reviewCount; 16 | @synthesize newFansCount; 17 | 18 | - (id)initWithParameters:(int)natmeCount andMsg:(int)nmsgCount andReview:(int)nreviewCount andFans:(int)nnewFansCount 19 | { 20 | OSCNotice *notice = [[OSCNotice alloc] init]; 21 | notice.atmeCount = natmeCount; 22 | notice.msgCount = nmsgCount; 23 | notice.reviewCount = nreviewCount; 24 | notice.newFansCount = nnewFansCount; 25 | return notice; 26 | } 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /oschina/ObjectReply.h: -------------------------------------------------------------------------------- 1 | // 2 | // ObjectReply.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-4-26. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ObjectReply : NSObject 12 | 13 | @property (copy,nonatomic) NSString * objectname; 14 | @property (copy,nonatomic) NSString * objectbody; 15 | 16 | - (id)initWithParameter:(NSString *)nobjectname andBody:(NSString *)nobjectbody; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /oschina/ObjectReply.m: -------------------------------------------------------------------------------- 1 | // 2 | // ObjectReply.m 3 | // oschina 4 | // 5 | // Created by wangjun on 12-4-26. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "ObjectReply.h" 10 | 11 | @implementation ObjectReply 12 | 13 | @synthesize objectbody; 14 | @synthesize objectname; 15 | 16 | - (id)initWithParameter:(NSString *)nobjectname andBody:(NSString *)nobjectbody 17 | { 18 | ObjectReply *or = [[ObjectReply alloc] init]; 19 | or.objectbody = nobjectbody; 20 | or.objectname = nobjectname; 21 | return or; 22 | } 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /oschina/Panel/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/Panel/.DS_Store -------------------------------------------------------------------------------- /oschina/Panel/Categories/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/Panel/Categories/.DS_Store -------------------------------------------------------------------------------- /oschina/Panel/Categories/UIView+JMNoise.h: -------------------------------------------------------------------------------- 1 | // UAModalPanel 2 | // 3 | // Created by Matt Coneybeare on 1/8/12. 4 | // Copyright (c) 2012 Urban Apps. All rights reserved. 5 | // 6 | 7 | #import 8 | 9 | @interface UIView (JMNoise) 10 | 11 | // Can be used directly on UIView 12 | - (void)applyNoise; 13 | - (void)applyNoiseWithOpacity:(CGFloat)opacity atLayerIndex:(NSUInteger) layerIndex; 14 | - (void)applyNoiseWithOpacity:(CGFloat)opacity; 15 | 16 | // Can be invoked from a drawRect() method 17 | - (void)drawCGNoise; 18 | - (void)drawCGNoiseWithOpacity:(CGFloat)opacity; 19 | - (void)drawCGNoiseWithOpacity:(CGFloat)opacity blendMode:(CGBlendMode)blendMode; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /oschina/Panel/Images/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/Panel/Images/.DS_Store -------------------------------------------------------------------------------- /oschina/Panel/Images/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/Panel/Images/close.png -------------------------------------------------------------------------------- /oschina/Panel/Images/close@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/Panel/Images/close@2x.png -------------------------------------------------------------------------------- /oschina/Panel/Panels/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/Panel/Panels/.DS_Store -------------------------------------------------------------------------------- /oschina/Panel/Panels/UATitledModalPanel.h: -------------------------------------------------------------------------------- 1 | // 2 | // UAModalTitledDisplayPanelView.h 3 | // UAModalPanel 4 | // 5 | // Created by Matt Coneybeare on 1/8/12. 6 | // Copyright (c) 2012 Urban Apps. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "UAModalPanel.h" 11 | #import "UANoisyGradientBackground.h" 12 | 13 | @interface UATitledModalPanel : UAModalPanel { 14 | 15 | CGFloat titleBarHeight; 16 | UANoisyGradientBackground *titleBar; 17 | UILabel *headerLabel; 18 | 19 | } 20 | 21 | // Height of the title view. Default = 40.0f 22 | @property (nonatomic, assign) CGFloat titleBarHeight; 23 | // The gradient bacground of the title 24 | @property (nonatomic, retain) UANoisyGradientBackground *titleBar; 25 | // The title label 26 | @property (nonatomic, retain) UILabel *headerLabel; 27 | 28 | - (CGRect)titleBarFrame; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /oschina/Panel/Views/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/Panel/Views/.DS_Store -------------------------------------------------------------------------------- /oschina/Panel/Views/UAGradientBackground.h: -------------------------------------------------------------------------------- 1 | // 2 | // UAGradientBackground.h 3 | // UAModalPanel 4 | // 5 | // Created by Matt Coneybeare on 1/8/12. 6 | // Copyright (c) 2012 Urban Apps. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | typedef enum { 12 | UAGradientBackgroundStyleRadial = 0, 13 | UAGradientBackgroundStyleRadialReversed, 14 | UAGradientBackgroundStyleLinear, 15 | UAGradientBackgroundStyleLinearReversed, 16 | UAGradientBackgroundStyleCenterHighlight, 17 | } UAGradientBackgroundStyle; 18 | 19 | typedef enum { 20 | UAGradientLineModeNone = 0, 21 | UAGradientLineModeTop = 2, 22 | UAGradientLineModeBottom = 4, 23 | UAGradientLineModeTopAndBottom = 8 24 | } UAGradientLineMode; 25 | 26 | @interface UAGradientBackground : UIView { 27 | UAGradientBackgroundStyle gradientStyle; 28 | UAGradientLineMode lineMode; 29 | CGFloat *colorComponents; 30 | } 31 | 32 | @property (nonatomic, assign) UAGradientBackgroundStyle gradientStyle; 33 | @property (nonatomic, assign) UAGradientLineMode lineMode; 34 | 35 | - (id)initWithFrame:(CGRect)frame style:(UAGradientBackgroundStyle)aStyle color:(CGFloat *)components lineMode:(UAGradientLineMode)lineModes; 36 | - (id)initWithFrame:(CGRect)frame color:(CGFloat *)components; 37 | - (id)initWithFrame:(CGRect)frame style:(UAGradientBackgroundStyle)aStyle; 38 | - (id)initWithFrame:(CGRect)frame; 39 | 40 | - (void)setColorComponents:(CGFloat *)components; 41 | 42 | + (id)gradientWithFrame:(CGRect)frame style:(UAGradientBackgroundStyle)aStyle color:(CGFloat *)components lineMode:(UAGradientLineMode)lineModes; 43 | + (id)gradientWithFrame:(CGRect)frame color:(CGFloat *)components; 44 | + (id)gradientWithFrame:(CGRect)frame style:(UAGradientBackgroundStyle)aStyle; 45 | + (id)gradientWithFrame:(CGRect)frame; 46 | @end 47 | -------------------------------------------------------------------------------- /oschina/Panel/Views/UANoisyGradientBackground.h: -------------------------------------------------------------------------------- 1 | // 2 | // UANoisyGradientBackground.h 3 | // UAModalPanel 4 | // 5 | // Created by Matt Coneybeare on 1/8/12. 6 | // Copyright (c) 2012 Urban Apps. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "UAGradientBackground.h" 11 | 12 | @interface UANoisyGradientBackground : UAGradientBackground { 13 | CGFloat noiseOpacity; 14 | CGBlendMode blendMode; 15 | } 16 | 17 | @property (nonatomic, assign) CGFloat noiseOpacity; 18 | @property (nonatomic, assign) CGBlendMode blendMode; 19 | 20 | - (id)initWithFrame:(CGRect)frame style:(UAGradientBackgroundStyle)aStyle color:(CGFloat *)components lineMode:(UAGradientLineMode)lineModes noiseOpacity:(CGFloat)opacity blendMode:(CGBlendMode)mode; 21 | - (id)initWithFrame:(CGRect)frame noiseOpacity:(CGFloat)opacity; 22 | - (id)initWithFrame:(CGRect)frame blendMode:(CGFloat)mode; 23 | 24 | + (id)gradientWithFrame:(CGRect)frame style:(UAGradientBackgroundStyle)aStyle color:(CGFloat *)components lineMode:(UAGradientLineMode)lineModes noiseOpacity:(CGFloat)opacity blendMode:(CGBlendMode)mode; 25 | + (id)gradientWithFrame:(CGRect)frame noiseOpacity:(CGFloat)opacity; 26 | + (id)gradientWithFrame:(CGRect)frame blendMode:(CGFloat)mode; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /oschina/Panel/Views/UARoundedRectView.h: -------------------------------------------------------------------------------- 1 | // 2 | // UARoundedRectView.h 3 | // UAModalPanel 4 | // 5 | // Created by Matt Coneybeare on 1/8/12. 6 | // Copyright (c) 2012 Urban Apps. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface UARoundedRectView : UIView { 13 | NSInteger radius; 14 | CGFloat *colorComponents; 15 | } 16 | 17 | @property (nonatomic, assign) NSInteger radius; 18 | 19 | - (void)setColors:(CGFloat *)components; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /oschina/Panel/Views/UARoundedRectView.m: -------------------------------------------------------------------------------- 1 | // 2 | // UARoundedRectView.m 3 | // UAModalPanel 4 | // 5 | // Created by Matt Coneybeare on 1/8/12. 6 | // Copyright (c) 2012 Urban Apps. All rights reserved. 7 | // 8 | 9 | #import "UARoundedRectView.h" 10 | #import 11 | 12 | @implementation UARoundedRectView 13 | 14 | @synthesize radius; 15 | 16 | + (Class)layerClass { 17 | return [CAGradientLayer class]; 18 | } 19 | - (id)initWithFrame:(CGRect)frame { 20 | if ((self = [super initWithFrame:frame])) { 21 | self.backgroundColor = [UIColor clearColor]; 22 | 23 | colorComponents = NSZoneMalloc(NSDefaultMallocZone(), 8*sizeof(CGFloat)); 24 | for (int i = 0; i < 8; i++) { 25 | colorComponents[i] = 1.0; 26 | } 27 | } 28 | return self; 29 | } 30 | 31 | - (void)setColors:(CGFloat *)components { 32 | for (int i = 0; i < 8; i++) { 33 | colorComponents[i] = components[i]; 34 | } 35 | 36 | CAGradientLayer *gradientLayer = (CAGradientLayer *)self.layer; 37 | gradientLayer.colors = 38 | [NSArray arrayWithObjects: 39 | (id)[UIColor colorWithRed:colorComponents[0] green:colorComponents[1] blue:colorComponents[2] alpha:colorComponents[3]].CGColor, 40 | (id)[UIColor colorWithRed:colorComponents[4] green:colorComponents[5] blue:colorComponents[6] alpha:colorComponents[7]].CGColor, 41 | nil]; 42 | 43 | } 44 | 45 | - (void)setRadius:(NSInteger)rad { 46 | radius = rad; 47 | CAGradientLayer *gradientLayer = (CAGradientLayer *)self.layer; 48 | gradientLayer.cornerRadius = rad*1.0f; 49 | } 50 | 51 | - (void)dealloc { 52 | NSZoneFree(NSDefaultMallocZone(), colorComponents); 53 | [super dealloc]; 54 | } 55 | 56 | 57 | @end 58 | -------------------------------------------------------------------------------- /oschina/Panels/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/Panels/.DS_Store -------------------------------------------------------------------------------- /oschina/Panels/UATitledModalPanel.h: -------------------------------------------------------------------------------- 1 | // 2 | // UAModalTitledDisplayPanelView.h 3 | // UAModalPanel 4 | // 5 | // Created by Matt Coneybeare on 1/8/12. 6 | // Copyright (c) 2012 Urban Apps. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "UAModalPanel.h" 11 | #import "UANoisyGradientBackground.h" 12 | 13 | @interface UATitledModalPanel : UAModalPanel { 14 | 15 | CGFloat titleBarHeight; 16 | UANoisyGradientBackground *titleBar; 17 | UILabel *headerLabel; 18 | 19 | } 20 | 21 | // Height of the title view. Default = 40.0f 22 | @property (nonatomic, assign) CGFloat titleBarHeight; 23 | // The gradient bacground of the title 24 | @property (nonatomic, retain) UANoisyGradientBackground *titleBar; 25 | // The title label 26 | @property (nonatomic, retain) UILabel *headerLabel; 27 | 28 | - (CGRect)titleBarFrame; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /oschina/Post.h: -------------------------------------------------------------------------------- 1 | // 2 | // Post.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-8. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface Post : NSObject 12 | 13 | @property int _id; 14 | @property int answerCount; 15 | @property int viewCount; 16 | @property (copy,nonatomic) NSString * title; 17 | @property (copy,nonatomic) NSString * author; 18 | @property int authorid; 19 | @property (copy,nonatomic) NSString * fromNowOn; 20 | @property (copy,nonatomic) NSString * img; 21 | @property (retain,nonatomic) UIImage * imgData; 22 | @property BOOL favorite; 23 | 24 | - (id)initWithParameters:(int)newID 25 | andTitle:(NSString *)nTitle 26 | andAnswer:(int)newAnswerCount 27 | andView:(int)newViewCount 28 | andAuthor:(NSString *)nauthor 29 | andAuthorID:(int)nAuthorID 30 | andFromNowOn:(NSString *)nfromNowOn 31 | andImg:(NSString *)nimg; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /oschina/Post.m: -------------------------------------------------------------------------------- 1 | // 2 | // Post.m 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-8. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "Post.h" 10 | 11 | @implementation Post 12 | 13 | @synthesize _id; 14 | @synthesize answerCount; 15 | @synthesize viewCount; 16 | @synthesize title; 17 | @synthesize author; 18 | @synthesize authorid; 19 | @synthesize fromNowOn; 20 | @synthesize img; 21 | @synthesize imgData; 22 | @synthesize favorite; 23 | 24 | - (id)initWithParameters:(int)newID 25 | andTitle:(NSString *)nTitle 26 | andAnswer:(int)newAnswerCount 27 | andView:(int)newViewCount 28 | andAuthor:(NSString *)nauthor 29 | andAuthorID:(int)nAuthorID 30 | andFromNowOn:(NSString *)nfromNowOn 31 | andImg:(NSString *)nimg 32 | { 33 | Post *p = [[Post alloc] init]; 34 | p._id = newID; 35 | p.title = nTitle; 36 | p.answerCount = newAnswerCount; 37 | p.viewCount = newViewCount; 38 | p.author = nauthor; 39 | p.authorid = nAuthorID; 40 | p.fromNowOn = nfromNowOn; 41 | p.img = nimg; 42 | return p; 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /oschina/PostBase.h: -------------------------------------------------------------------------------- 1 | // 2 | // PostBase.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-14. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "PostPubView.h" 11 | #import "PostsView.h" 12 | 13 | @interface PostBase : UIViewController 14 | 15 | @property (strong,nonatomic) UISegmentedControl * segment_title; 16 | @property (strong,nonatomic) PostsView * postsView; 17 | 18 | - (NSString *)getSegmentTitle; 19 | - (void)myInit; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /oschina/PostCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // PostCell.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-8. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface PostCell : UITableViewCell 12 | 13 | @property (strong, nonatomic) IBOutlet UILabel *lbl_AnswerCount; 14 | @property (strong, nonatomic) IBOutlet UIImageView *img; 15 | @property (strong, nonatomic) IBOutlet UILabel *lblAuthor; 16 | @property (strong, nonatomic) IBOutlet UITextView *txt_Title; 17 | @property (strong, nonatomic) IBOutlet UILabel *lbl_answer_chinese; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /oschina/PostCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // PostCell.m 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-8. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "PostCell.h" 10 | 11 | @implementation PostCell 12 | 13 | @synthesize lbl_AnswerCount; 14 | @synthesize img; 15 | @synthesize lblAuthor; 16 | @synthesize txt_Title; 17 | @synthesize lbl_answer_chinese; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /oschina/PostDetail.h: -------------------------------------------------------------------------------- 1 | // 2 | // PostDetail.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-12. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface PostDetail : UIViewController 12 | @property (strong, nonatomic) IBOutlet UIWebView *webView; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /oschina/PostPubView.h: -------------------------------------------------------------------------------- 1 | // 2 | // PostPubView.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-31. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "Tool.h" 11 | 12 | @interface PostPubView : UIViewController 13 | 14 | @property (strong, nonatomic) IBOutlet UITextField *txtTitle; 15 | @property (strong, nonatomic) IBOutlet UISegmentedControl *segmentCatalog; 16 | @property (strong, nonatomic) IBOutlet UITextView *txtContent; 17 | @property (strong, nonatomic) IBOutlet UISwitch *switchNotice; 18 | - (IBAction)clickPub:(id)sender; 19 | - (IBAction)txtTitleExit:(id)sender; 20 | - (IBAction)backgroundTouchDown:(id)sender; 21 | - (IBAction)segmentChanged:(id)sender; 22 | - (IBAction)isNoticeMeChanged:(id)sender; 23 | - (IBAction)textChanged:(id)sender; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /oschina/PostsView.h: -------------------------------------------------------------------------------- 1 | // 2 | // PostsView.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-6. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "Post.h" 11 | #import "PostCell.h" 12 | #import "PostBase.h" 13 | #import "SinglePost.h" 14 | #import "MessageSystemView.h" 15 | #import "ShareView.h" 16 | 17 | #import "UITap.h" 18 | #import "TQImageCache.h" 19 | 20 | @interface PostsView : UIViewController 21 | { 22 | NSMutableArray * posts; 23 | BOOL isLoadOver; 24 | BOOL isLoading; 25 | int allCount; 26 | 27 | //下拉刷新 28 | EGORefreshTableHeaderView *_refreshHeaderView; 29 | BOOL _reloading; 30 | 31 | BOOL isInitialize; 32 | TQImageCache * _iconCache; 33 | } 34 | @property (strong, nonatomic) IBOutlet UITableView *tablePosts; 35 | //异步加载图片专用 36 | @property (nonatomic, retain) NSMutableDictionary *imageDownloadsInProgress; 37 | - (void)startIconDownload:(ImgRecord *)imgRecord forIndexPath:(NSIndexPath *)indexPath; 38 | 39 | //重新加载 40 | - (void)reloadType:(int)ncatalog; 41 | - (void)reload:(BOOL)noRefresh; 42 | @property int catalog; 43 | @property (copy, nonatomic) NSString * tag; 44 | 45 | //下拉刷新 46 | - (void)clear; 47 | - (void)refresh; 48 | - (void)reloadTableViewDataSource; 49 | - (void)doneLoadingTableViewData; 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /oschina/ProfileBase.h: -------------------------------------------------------------------------------- 1 | // 2 | // ProfileBase.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-12. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "MessageView.h" 11 | #import "ActivesView.h" 12 | #import "PubMessage.h" 13 | #import "OSAppDelegate.h" 14 | #import "OSCNotice.h" 15 | 16 | @interface ProfileBase : UIViewController 17 | { 18 | int nextTabIndexByNotice; 19 | } 20 | 21 | @property (strong, nonatomic) UISegmentedControl * segment_Title; 22 | @property (strong, nonatomic) MessageView * msgView; 23 | @property (strong, nonatomic) ActivesView * activesView; 24 | @property (retain, nonatomic) NSArray * titles; 25 | 26 | - (NSString *)getSegmentTitle; 27 | 28 | @property BOOL isLoginJustNow; 29 | 30 | - (void)myInit; 31 | - (void)clearOSCNotice:(int)type; 32 | - (void)segmentAction:(id)sender; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /oschina/ProfileModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // ProfileModel.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-9. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ProfileModel : NSObject 12 | 13 | @property int tag; 14 | @property (copy,nonatomic) NSString * key; 15 | @property (copy,nonatomic) NSString * value; 16 | 17 | - (id)initWithParameters:(NSString *)nKey andValue:(NSString *)nValue andTag:(int)nTag; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /oschina/ProfileModel.m: -------------------------------------------------------------------------------- 1 | // 2 | // ProfileModel.m 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-9. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "ProfileModel.h" 10 | 11 | @implementation ProfileModel 12 | 13 | @synthesize tag; 14 | @synthesize key; 15 | @synthesize value; 16 | 17 | - (id)initWithParameters:(NSString *)nKey andValue:(NSString *)nValue andTag:(int)nTag 18 | { 19 | ProfileModel *p = [ProfileModel new]; 20 | p.key = nKey; 21 | p.value = nValue; 22 | p.tag = nTag; 23 | return p; 24 | } 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /oschina/PubMessage.h: -------------------------------------------------------------------------------- 1 | // 2 | // PubMessage.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-13. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "Tool.h" 11 | #import "ApiError.h" 12 | #import "Config.h" 13 | 14 | @interface PubMessage : UIViewController 15 | 16 | - (IBAction)clickPubMessage:(id)sender; 17 | - (IBAction)clickbackground:(id)sender; 18 | //接受者 19 | @property (nonatomic,copy) NSString * receiver; 20 | @property int receiverid; 21 | @property BOOL isFromUserView; 22 | @property (strong, nonatomic) IBOutlet UILabel *lbl_Receiver; 23 | - (IBAction)clickDidOnExit:(id)sender; 24 | @property (strong, nonatomic) IBOutlet UITextView *txtContent; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /oschina/PubTweet.h: -------------------------------------------------------------------------------- 1 | // 2 | // PubTweet.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-6. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "Tool.h" 11 | #import "ApiError.h" 12 | #import 13 | #import "TwitterView.h" 14 | #import "MyThread.h" 15 | #import "MBProgressHUD.h" 16 | #import "TSEmojiView.h" 17 | 18 | @interface PubTweet : UIViewController 19 | { 20 | //加载指示 21 | MBProgressHUD * hud; 22 | 23 | //表情 24 | TSEmojiView * _emojiView; 25 | UIScrollView * scroll; 26 | } 27 | 28 | @property (strong, nonatomic) IBOutlet UIImageView *img; 29 | @property (strong, nonatomic) TwitterView * parent; 30 | @property (strong, nonatomic) IBOutlet UILabel *lblHeadTip; 31 | @property (strong, nonatomic) IBOutlet UITextView *txtContent; 32 | @property BOOL isSourceUser; 33 | @property (strong, nonatomic) IBOutlet UILabel *lblStringlength; 34 | @property (copy, nonatomic) NSString * atSomebody; 35 | 36 | - (IBAction)click_PubTweet:(id)sender; 37 | - (IBAction)clickBackground:(id)sender; 38 | - (IBAction)txtDidOnExit:(id)sender; 39 | - (IBAction)clickImgs:(id)sender; 40 | - (IBAction)clickFace:(id)sender; 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /oschina/QuadCurveMenu.h: -------------------------------------------------------------------------------- 1 | // 2 | // QuadCurveMenu.h 3 | // AwesomeMenu 4 | // 5 | // Created by Levey on 11/30/11. 6 | // Copyright (c) 2011 lunaapp.com. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "QuadCurveMenuItem.h" 11 | 12 | @protocol QuadCurveMenuDelegate; 13 | 14 | @interface QuadCurveMenu : UIView 15 | { 16 | NSArray *_menusArray; 17 | int _flag; 18 | NSTimer *_timer; 19 | QuadCurveMenuItem *_addButton; 20 | 21 | id _delegate; 22 | 23 | } 24 | @property (nonatomic, copy) NSArray *menusArray; 25 | @property (nonatomic, getter = isExpanding) BOOL expanding; 26 | @property (nonatomic, assign) id delegate; 27 | - (id)initWithFrame:(CGRect)frame menus:(NSArray *)aMenusArray; 28 | @end 29 | 30 | @protocol QuadCurveMenuDelegate 31 | - (void)quadCurveMenu:(QuadCurveMenu *)menu didSelectIndex:(NSInteger)idx; 32 | @end -------------------------------------------------------------------------------- /oschina/QuadCurveMenuItem.h: -------------------------------------------------------------------------------- 1 | // 2 | // QuadCurveMenuItem.h 3 | // AwesomeMenu 4 | // 5 | // Created by Levey on 11/30/11. 6 | // Copyright (c) 2011 lunaapp.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol QuadCurveMenuItemDelegate; 12 | 13 | @interface QuadCurveMenuItem : UIImageView 14 | { 15 | UIImageView *_contentImageView; 16 | CGPoint _startPoint; 17 | CGPoint _endPoint; 18 | CGPoint _nearPoint; // near 19 | CGPoint _farPoint; // far 20 | 21 | id _delegate; 22 | } 23 | 24 | @property (nonatomic) CGPoint startPoint; 25 | @property (nonatomic) CGPoint endPoint; 26 | @property (nonatomic) CGPoint nearPoint; 27 | @property (nonatomic) CGPoint farPoint; 28 | 29 | @property (nonatomic, assign) id delegate; 30 | 31 | - (id)initWithImage:(UIImage *)img 32 | highlightedImage:(UIImage *)himg 33 | ContentImage:(UIImage *)cimg 34 | highlightedContentImage:(UIImage *)hcimg; 35 | 36 | 37 | @end 38 | 39 | @protocol QuadCurveMenuItemDelegate 40 | - (void)quadCurveMenuItemTouchesBegan:(QuadCurveMenuItem *)item; 41 | - (void)quadCurveMenuItemTouchesEnd:(QuadCurveMenuItem *)item; 42 | @end -------------------------------------------------------------------------------- /oschina/RTActiveCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // RTActiveCell.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-6-4. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "RTLabel.h" 11 | #import "EGOImageView.h" 12 | 13 | @interface RTActiveCell : UITableViewCell 14 | 15 | @property (strong, nonatomic) IBOutlet EGOImageView *imgPortrait; 16 | @property (strong, nonatomic) IBOutlet EGOImageView *imgTweet; 17 | @property (retain, nonatomic) RTLabel * rtLabel; 18 | 19 | + (RTLabel*)textLabel; 20 | - (void)initialize; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /oschina/RTActiveCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // RTActiveCell.m 3 | // oschina 4 | // 5 | // Created by wangjun on 12-6-4. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "RTActiveCell.h" 10 | 11 | @implementation RTActiveCell 12 | @synthesize imgPortrait; 13 | @synthesize imgTweet; 14 | @synthesize rtLabel; 15 | 16 | - (void)initialize 17 | { 18 | self.rtLabel = [RTActiveCell textLabel]; 19 | [self.rtLabel setLineSpacing:18]; 20 | [self.contentView addSubview:self.rtLabel]; 21 | [self.rtLabel setBackgroundColor:[UIColor clearColor]]; 22 | self.imgPortrait.placeholderImage = [UIImage imageNamed:@"avatar_loading.jpg"]; 23 | self.imgTweet.placeholderImage = [UIImage imageNamed:@"tweetloading.jpg"]; 24 | } 25 | - (void)layoutSubviews 26 | { 27 | [super layoutSubviews]; 28 | 29 | CGSize optimumSize = [self.rtLabel optimumSize]; 30 | CGRect frame = [self.rtLabel frame]; 31 | frame.size.height = (int)optimumSize.height+5; // +5 to fix height issue, this should be automatically fixed in iOS5 32 | [self.rtLabel setFrame:frame]; 33 | } 34 | + (RTLabel*)textLabel 35 | { 36 | RTLabel *label = [[RTLabel alloc] initWithFrame:CGRectMake(50,8,250,100)]; 37 | [label setParagraphReplacement:@""]; 38 | return label; 39 | } 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /oschina/RelativeNews.h: -------------------------------------------------------------------------------- 1 | // 2 | // RelativeNews.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-4-11. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface RelativeNews : NSObject 12 | 13 | @property (nonatomic,copy) NSString * url; 14 | @property (nonatomic,copy) NSString * title; 15 | 16 | - (id)initWithParameters:(NSString *)nurl andTitle:(NSString *)ntitle; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /oschina/RelativeNews.m: -------------------------------------------------------------------------------- 1 | // 2 | // RelativeNews.m 3 | // oschina 4 | // 5 | // Created by wangjun on 12-4-11. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "RelativeNews.h" 10 | 11 | @implementation RelativeNews 12 | 13 | @synthesize url; 14 | @synthesize title; 15 | 16 | - (id)initWithParameters:(NSString *)nurl andTitle:(NSString *)ntitle 17 | { 18 | RelativeNews *r = [[RelativeNews alloc] init]; 19 | r.url = nurl; 20 | r.title = ntitle; 21 | return r; 22 | } 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /oschina/ReplyMsgView.h: -------------------------------------------------------------------------------- 1 | // 2 | // ReplyMsgView.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-13. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "Tool.h" 11 | #import "MessageSystemView.h" 12 | #import "Comment.h" 13 | @class MessageSystemView; 14 | 15 | @interface ReplyMsgView : UIViewController 16 | { 17 | NSString * commentBeforeLogin; 18 | } 19 | - (IBAction)clickBackground:(id)sender; 20 | 21 | - (IBAction)clickReply:(id)sender; 22 | 23 | @property (retain,nonatomic) NSString * lblTitle; 24 | @property (retain,nonatomic) NSString * btnTitle; 25 | 26 | 27 | @property (strong, nonatomic) MessageSystemView * parent; 28 | @property (strong, nonatomic) IBOutlet UIWebView *webViewReply; 29 | @property (retain, nonatomic) Comment * parentComment; 30 | - (IBAction)clickDidOnExit:(id)sender; 31 | @property (strong, nonatomic) IBOutlet UITextView *txtReply; 32 | 33 | @property int parentCommentID; 34 | @property int catalog; 35 | @property int replyID; 36 | @property int authorID; 37 | @end 38 | -------------------------------------------------------------------------------- /oschina/SSPhotoCropper/Graphics/photo_cropper_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/SSPhotoCropper/Graphics/photo_cropper_bg.png -------------------------------------------------------------------------------- /oschina/SSPhotoCropper/Graphics/photo_cropper_bg@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/SSPhotoCropper/Graphics/photo_cropper_bg@2x.png -------------------------------------------------------------------------------- /oschina/SSPhotoCropper/Graphics/photo_cropper_rect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/SSPhotoCropper/Graphics/photo_cropper_rect.png -------------------------------------------------------------------------------- /oschina/SSPhotoCropper/Graphics/photo_cropper_rect@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/SSPhotoCropper/Graphics/photo_cropper_rect@2x.png -------------------------------------------------------------------------------- /oschina/SSPhotoCropper/Graphics/photo_cropper_rect_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/SSPhotoCropper/Graphics/photo_cropper_rect_on.png -------------------------------------------------------------------------------- /oschina/SSPhotoCropper/Graphics/photo_cropper_rect_on@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/SSPhotoCropper/Graphics/photo_cropper_rect_on@2x.png -------------------------------------------------------------------------------- /oschina/SearchResult.h: -------------------------------------------------------------------------------- 1 | // 2 | // SearchResult.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-5-9. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SearchResult : NSObject 12 | 13 | @property int objid; 14 | @property int type; 15 | @property (nonatomic,copy) NSString * title; 16 | @property (nonatomic,copy) NSString * url; 17 | @property (copy,nonatomic) NSString * pubDate; 18 | @property (copy,nonatomic) NSString * author; 19 | 20 | - (id)initWithParameters:(int)nobjid 21 | andType:(int)ntype 22 | andTitle:(NSString *)ntitle 23 | andUrl:(NSString *)nurl 24 | andPubDate:(NSString *)nPubDate 25 | andAuthor:(NSString *)nauthor; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /oschina/SearchResult.m: -------------------------------------------------------------------------------- 1 | // 2 | // SearchResult.m 3 | // oschina 4 | // 5 | // Created by wangjun on 12-5-9. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "SearchResult.h" 10 | 11 | @implementation SearchResult 12 | 13 | @synthesize objid; 14 | @synthesize type; 15 | @synthesize title; 16 | @synthesize url; 17 | @synthesize pubDate; 18 | @synthesize author; 19 | 20 | - (id)initWithParameters:(int)nobjid 21 | andType:(int)ntype 22 | andTitle:(NSString *)ntitle 23 | andUrl:(NSString *)nurl 24 | andPubDate:(NSString *)nPubDate 25 | andAuthor:(NSString *)nauthor 26 | { 27 | SearchResult * result = [[SearchResult alloc] init]; 28 | result.objid = nobjid; 29 | result.type = ntype; 30 | result.title = ntitle; 31 | result.url = nurl; 32 | result.pubDate = nPubDate; 33 | result.author = nauthor; 34 | return result; 35 | } 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /oschina/SearchView.h: -------------------------------------------------------------------------------- 1 | // 2 | // SearchView.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-5-10. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "SearchResult.h" 11 | #import "MBProgressHUD.h" 12 | 13 | @interface SearchView : UIViewController 14 | { 15 | NSMutableArray * results; 16 | BOOL isLoading; 17 | BOOL isLoadOver; 18 | 19 | int allCount; 20 | } 21 | @property (strong, nonatomic) IBOutlet UISegmentedControl *segmentSearch; 22 | @property (strong, nonatomic) IBOutlet UITableView *tableResult; 23 | @property (strong, nonatomic) IBOutlet UISearchBar *_searchBar; 24 | - (IBAction)segementChanged:(id)sender; 25 | 26 | -(void)doSearch; 27 | -(void)clear; 28 | 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /oschina/SettingModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // SettingModel.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-5. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SettingModel : NSObject 12 | 13 | @property (copy,nonatomic) NSString * img; 14 | @property (copy,nonatomic) NSString * title; 15 | @property (copy,nonatomic) NSString * title2; 16 | @property NSUInteger tag; 17 | 18 | - (id)initWith:(NSString *)_title andImg:(NSString *)_img andTag:(NSUInteger)_tag andTitle2:(NSString *)_title2; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /oschina/SettingModel.m: -------------------------------------------------------------------------------- 1 | // 2 | // SettingModel.m 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-5. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "SettingModel.h" 10 | 11 | @implementation SettingModel 12 | 13 | @synthesize img; 14 | @synthesize title; 15 | @synthesize title2; 16 | @synthesize tag; 17 | 18 | - (id)initWith:(NSString *)_title andImg:(NSString *)_img andTag:(NSUInteger)_tag andTitle2:(NSString *)_title2; 19 | { 20 | SettingModel *result = [[SettingModel alloc] init]; 21 | result.title = _title; 22 | result.img = _img; 23 | result.tag = _tag; 24 | result.title2 = _title2; 25 | return result; 26 | } 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /oschina/SettingView.h: -------------------------------------------------------------------------------- 1 | // 2 | // SettingView.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-5. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "SettingModel.h" 11 | #import "About.h" 12 | #import "LoginView.h" 13 | #import "SearchView.h" 14 | #import "SoftwareView.h" 15 | #import "SoftwareTypeView.h" 16 | #import "SoftwaresBase.h" 17 | #import "MyView.h" 18 | 19 | @interface SettingView : UIViewController 20 | { 21 | NSArray * settings; 22 | NSMutableDictionary * settingsInSection; 23 | } 24 | 25 | @property (strong, nonatomic) IBOutlet UITableView *tableSettings; 26 | @property (retain,nonatomic) NSArray * settings; 27 | @property (retain,nonatomic) NSMutableDictionary * settingsInSection; 28 | 29 | - (void)refresh; 30 | 31 | - (void)checkVersionNeedUpdate; 32 | 33 | + (int)getVersionNumber:(NSString *)version; 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /oschina/ShareObject.h: -------------------------------------------------------------------------------- 1 | // 2 | // ShareObject.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-16. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ShareObject : NSObject 12 | 13 | @property (copy,nonatomic) NSString * title; 14 | @property (copy,nonatomic) NSString * url; 15 | 16 | - (id)initWithParameters:(NSString *)ntitle andUrl:(NSString *)nurl; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /oschina/ShareObject.m: -------------------------------------------------------------------------------- 1 | // 2 | // ShareObject.m 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-16. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "ShareObject.h" 10 | 11 | @implementation ShareObject 12 | 13 | @synthesize title; 14 | @synthesize url; 15 | 16 | - (id)initWithParameters:(NSString *)ntitle andUrl:(NSString *)nurl 17 | { 18 | ShareObject *s = [[ShareObject alloc] init]; 19 | s.title = ntitle; 20 | s.url = nurl; 21 | return s; 22 | } 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /oschina/ShareView.h: -------------------------------------------------------------------------------- 1 | // 2 | // ShareView.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-12. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | //#import "OAuthEngine.h" 11 | //#import "WeiboClient.h" 12 | //#import "OAuthController.h" 13 | #import "Tool.h" 14 | #import "ShareObject.h" 15 | #import "UITap.h" 16 | 17 | #define SinaAppKey @"3616966952" 18 | #define SinaAppSecret @"fd81f6d31427b467f49226e48a741e28" 19 | 20 | @interface ShareView : UIViewController 21 | { 22 | NSString * url; 23 | NSString * content; 24 | 25 | UIAlertView *progressView; 26 | 27 | UITap *tapSina; 28 | UITap *tapQQ; 29 | 30 | BOOL isInitialize; 31 | 32 | MBProgressHUD * hud; 33 | } 34 | @property (strong, nonatomic) IBOutlet UIImageView *imgSina; 35 | @property (strong, nonatomic) IBOutlet UIImageView *imgQQ; 36 | 37 | @property (copy,nonatomic) NSString * url; 38 | @property (copy,nonatomic) NSString * content; 39 | 40 | - (IBAction)click_qqshare:(id)sender; 41 | - (IBAction)click_weibo:(id)sender; 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /oschina/SingleNews.h: -------------------------------------------------------------------------------- 1 | // 2 | // SingleNews.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-16. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SingleNews : NSObject 12 | 13 | @property int _id; 14 | @property (copy,nonatomic) NSString * title; 15 | @property (copy,nonatomic) NSString * url; 16 | @property (copy,nonatomic) NSString * body; 17 | @property (copy,nonatomic) NSString * author; 18 | @property int authorid; 19 | @property (copy,nonatomic) NSString * pubDate; 20 | @property int commentCount; 21 | @property (retain,nonatomic) NSArray * relativies; 22 | @property (copy,nonatomic) NSString * softwarelink; 23 | @property (copy,nonatomic) NSString * softwarename; 24 | @property BOOL favorite; 25 | 26 | - (id)initWithParameters:(int)newid 27 | andTitle:(NSString *)ntitle 28 | andUrl:(NSString *)newUrl 29 | andBody:(NSString *)newBody 30 | andAuthor:(NSString *)newAuthor 31 | andAuthorID:(int)nauthorID 32 | andPubDate:(NSString *)nPubDate 33 | andCommentCount:(int)nCommentCount 34 | andFavorite:(BOOL)nfavorite; 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /oschina/SingleNews.m: -------------------------------------------------------------------------------- 1 | // 2 | // SingleNews.m 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-16. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "SingleNews.h" 10 | 11 | @implementation SingleNews 12 | 13 | @synthesize _id; 14 | @synthesize title; 15 | @synthesize url; 16 | @synthesize body; 17 | @synthesize author; 18 | @synthesize authorid; 19 | @synthesize pubDate; 20 | @synthesize commentCount; 21 | @synthesize relativies; 22 | @synthesize softwarelink; 23 | @synthesize softwarename; 24 | @synthesize favorite; 25 | 26 | - (id)initWithParameters:(int)newid 27 | andTitle:(NSString *)ntitle 28 | andUrl:(NSString *)newUrl 29 | andBody:(NSString *)newBody 30 | andAuthor:(NSString *)newAuthor 31 | andAuthorID:(int)nauthorID 32 | andPubDate:(NSString *)nPubDate 33 | andCommentCount:(int)nCommentCount 34 | andFavorite:(BOOL)nfavorite 35 | { 36 | SingleNews *news = [[SingleNews alloc] init]; 37 | news._id = newid; 38 | news.title = ntitle; 39 | news.url = newUrl; 40 | news.body = newBody; 41 | news.author = newAuthor; 42 | news.authorid = nauthorID; 43 | news.pubDate = nPubDate; 44 | news.commentCount = nCommentCount; 45 | news.favorite = nfavorite; 46 | return news; 47 | } 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /oschina/SinglePost.h: -------------------------------------------------------------------------------- 1 | // 2 | // SinglePost.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-14. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "SinglePostDetail.h" 11 | #import "Notification_CommentCount.h" 12 | #import "Tool.h" 13 | #import "PubMessage.h" 14 | 15 | @interface SinglePost : UIViewController 16 | { 17 | UIBarButtonItem * btnFavorite; 18 | } 19 | @property (retain, nonatomic) IBOutlet UIWebView *webView; 20 | 21 | - (void)loadData:(SinglePostDetail *)p; 22 | 23 | //帖子id 24 | @property int postID; 25 | @property (retain,nonatomic) SinglePostDetail * singlePost; 26 | - (void)refreshFavorite:(SinglePostDetail *)p; 27 | @end 28 | -------------------------------------------------------------------------------- /oschina/SinglePostDetail.h: -------------------------------------------------------------------------------- 1 | // 2 | // SinglePostDetail.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-16. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SinglePostDetail : NSObject 12 | 13 | @property int _id; 14 | @property (copy,nonatomic) NSString * title; 15 | @property (copy,nonatomic) NSString * url; 16 | @property (copy,nonatomic) NSString * portrait; 17 | @property (copy,nonatomic) NSString * body; 18 | @property (copy,nonatomic) NSString * author; 19 | @property int authorid; 20 | @property (copy,nonatomic) NSString * pubDate; 21 | @property int answerCount; 22 | @property int viewCount; 23 | @property BOOL favorite; 24 | @property (retain,nonatomic) NSMutableArray * tags; 25 | 26 | - (id)initWithParameters:(int)newid 27 | andTitle:(NSString *)ntitle 28 | andUrl:(NSString *)nUrl 29 | andPortrait:(NSString *)nportrait 30 | andBody:(NSString *)nbody 31 | andAuthor:(NSString *)nauthor 32 | andAuthorID:(int)nauthorid 33 | andPubDate:(NSString *)nPubDate 34 | andAnswer:(int)nanswerCount 35 | andView:(int)nviewCount 36 | andFavorite:(BOOL)nfavorite 37 | andTags:(NSMutableArray *)_tags; 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /oschina/SinglePostDetail.m: -------------------------------------------------------------------------------- 1 | // 2 | // SinglePostDetail.m 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-16. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "SinglePostDetail.h" 10 | 11 | @implementation SinglePostDetail 12 | 13 | @synthesize _id; 14 | @synthesize title; 15 | @synthesize portrait; 16 | @synthesize body; 17 | @synthesize author; 18 | @synthesize authorid; 19 | @synthesize pubDate; 20 | @synthesize answerCount; 21 | @synthesize viewCount; 22 | @synthesize url; 23 | @synthesize favorite; 24 | @synthesize tags; 25 | 26 | - (id)initWithParameters:(int)newid 27 | andTitle:(NSString *)ntitle 28 | andUrl:(NSString *)nUrl 29 | andPortrait:(NSString *)nportrait 30 | andBody:(NSString *)nbody 31 | andAuthor:(NSString *)nauthor 32 | andAuthorID:(int)nauthorid 33 | andPubDate:(NSString *)nPubDate 34 | andAnswer:(int)nanswerCount 35 | andView:(int)nviewCount 36 | andFavorite:(BOOL)nfavorite 37 | andTags:(NSMutableArray *)_tags 38 | { 39 | SinglePostDetail *p = [[SinglePostDetail alloc] init]; 40 | p._id = newid; 41 | p.title = ntitle; 42 | p.url = nUrl; 43 | p.portrait = nportrait; 44 | p.body = nbody; 45 | p.author = nauthor; 46 | p.authorid = nauthorid; 47 | p.pubDate = nPubDate; 48 | p.answerCount = nanswerCount; 49 | p.viewCount = nviewCount; 50 | p.favorite = nfavorite; 51 | p.tags = _tags; 52 | return p; 53 | } 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /oschina/Software.h: -------------------------------------------------------------------------------- 1 | // 2 | // Software.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-4-25. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface Software : NSObject 12 | 13 | @property int _id; 14 | @property (copy,nonatomic) NSString * title; 15 | @property (copy,nonatomic) NSString * extensionTitle; 16 | @property (copy,nonatomic) NSString * license; 17 | @property (copy,nonatomic) NSString * body; 18 | @property (copy,nonatomic) NSString * homePage; 19 | @property (copy,nonatomic) NSString * document; 20 | @property (copy,nonatomic) NSString * download; 21 | @property (copy,nonatomic) NSString * logo; 22 | @property (copy,nonatomic) NSString * language; 23 | @property (copy,nonatomic) NSString * os; 24 | @property (copy,nonatomic) NSString * recordTime; 25 | @property BOOL favorite; 26 | 27 | - (id)initWithParemters:(int)nid 28 | andTitle:(NSString *)ntitle 29 | andExtension:(NSString *)nExtensionTitle 30 | andLicense:(NSString *)nlicense 31 | andBody:(NSString *)nbody 32 | andHomepage:(NSString *)nhomepage 33 | andDocument:(NSString *)ndocument 34 | andDownload:(NSString *)ndownload 35 | andLogo:(NSString *)nlogo 36 | andLanguage:(NSString *)nlanguage 37 | andOS:(NSString *)nos 38 | andRecordTime:(NSString *)nrecordTime 39 | andFavorite:(BOOL)nfavorite; 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /oschina/Software.m: -------------------------------------------------------------------------------- 1 | // 2 | // Software.m 3 | // oschina 4 | // 5 | // Created by wangjun on 12-4-25. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "Software.h" 10 | 11 | @implementation Software 12 | 13 | @synthesize _id; 14 | @synthesize title; 15 | @synthesize extensionTitle; 16 | @synthesize license; 17 | @synthesize body; 18 | @synthesize homePage; 19 | @synthesize document; 20 | @synthesize download; 21 | @synthesize logo; 22 | @synthesize language; 23 | @synthesize os; 24 | @synthesize recordTime; 25 | @synthesize favorite; 26 | 27 | - (id)initWithParemters:(int)nid 28 | andTitle:(NSString *)ntitle 29 | andExtension:(NSString *)nExtensionTitle 30 | andLicense:(NSString *)nlicense 31 | andBody:(NSString *)nbody 32 | andHomepage:(NSString *)nhomepage 33 | andDocument:(NSString *)ndocument 34 | andDownload:(NSString *)ndownload 35 | andLogo:(NSString *)nlogo 36 | andLanguage:(NSString *)nlanguage 37 | andOS:(NSString *)nos 38 | andRecordTime:(NSString *)nrecordTime 39 | andFavorite:(BOOL)nfavorite 40 | { 41 | Software *s = [[Software alloc] init]; 42 | s._id = nid; 43 | s.title = ntitle; 44 | s.extensionTitle = nExtensionTitle; 45 | s.license = nlicense; 46 | s.body = nbody; 47 | s.homePage = nhomepage; 48 | s.document = ndocument; 49 | s.download = ndownload; 50 | s.logo = nlogo; 51 | s.language = nlanguage; 52 | s.os = nos; 53 | s.recordTime = nrecordTime; 54 | s.favorite = nfavorite; 55 | 56 | return s; 57 | } 58 | 59 | @end 60 | -------------------------------------------------------------------------------- /oschina/SoftwareCatalog.h: -------------------------------------------------------------------------------- 1 | // 2 | // SoftwareCatalog.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-5-9. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SoftwareCatalog : NSObject 12 | 13 | @property (nonatomic,copy) NSString * name; 14 | @property int tag; 15 | 16 | - (id)initWithParameters:(NSString *)newName andTag:(int)nTag; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /oschina/SoftwareCatalog.m: -------------------------------------------------------------------------------- 1 | // 2 | // SoftwareCatalog.m 3 | // oschina 4 | // 5 | // Created by wangjun on 12-5-9. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "SoftwareCatalog.h" 10 | 11 | @implementation SoftwareCatalog 12 | 13 | @synthesize name; 14 | @synthesize tag; 15 | 16 | - (id)initWithParameters:(NSString *)newName andTag:(int)nTag 17 | { 18 | SoftwareCatalog *s = [[SoftwareCatalog alloc] init]; 19 | s.name = newName; 20 | s.tag = nTag; 21 | return s; 22 | } 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /oschina/SoftwareDetail.h: -------------------------------------------------------------------------------- 1 | // 2 | // SoftwareDetail.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-27. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "Tool.h" 11 | #import "EGOImageView.h" 12 | #import "Software.h" 13 | 14 | @interface SoftwareDetail : UIViewController 15 | { 16 | NSString *str_homepage; 17 | NSString *str_document; 18 | NSString *str_download; 19 | 20 | UIBarButtonItem * btnFavorite; 21 | 22 | int objid; 23 | } 24 | @property (strong, nonatomic) IBOutlet UIWebView *webView; 25 | 26 | @property (copy,nonatomic) NSString * softwareName; 27 | 28 | - (NSString *)getButtonString:(NSString *)homePage andDocument:(NSString *)document andDownload:(NSString *)download; 29 | 30 | - (void)loadData:(Software *)s; 31 | - (void)refreshFavorite:(Software *)s; 32 | @end 33 | -------------------------------------------------------------------------------- /oschina/SoftwareTypeView.h: -------------------------------------------------------------------------------- 1 | // 2 | // SoftwareTypeView.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-5-14. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "SoftwareCatalog.h" 11 | 12 | @interface SoftwareTypeView : UIViewController 13 | { 14 | NSMutableArray * softwareCatalogs; 15 | BOOL isLoading; 16 | BOOL isLoadOver; 17 | } 18 | @property (strong, nonatomic) IBOutlet UITableView *tableSoftwareCatalogs; 19 | @property (retain, nonatomic) NSString * headTitle; 20 | @property int tag; 21 | 22 | -(void)reload; 23 | -(void)clear; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /oschina/SoftwareUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // SoftwareUnit.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-5-9. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SoftwareUnit : NSObject 12 | 13 | @property (copy,nonatomic) NSString * name; 14 | @property (copy,nonatomic) NSString * description; 15 | @property (copy,nonatomic) NSString * url; 16 | 17 | - (id)initWithParameters:(NSString *)newName andDescription:(NSString *)newDescription andUrl:(NSString *)newUrl; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /oschina/SoftwareUnit.m: -------------------------------------------------------------------------------- 1 | // 2 | // SoftwareUnit.m 3 | // oschina 4 | // 5 | // Created by wangjun on 12-5-9. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "SoftwareUnit.h" 10 | 11 | @implementation SoftwareUnit 12 | 13 | @synthesize name; 14 | @synthesize description; 15 | @synthesize url; 16 | 17 | - (id)initWithParameters:(NSString *)newName andDescription:(NSString *)newDescription andUrl:(NSString *)newUrl 18 | { 19 | SoftwareUnit * s = [[SoftwareUnit alloc] init]; 20 | s.name = newName; 21 | s.description = newDescription; 22 | s.url = newUrl; 23 | return s; 24 | } 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /oschina/SoftwareView.h: -------------------------------------------------------------------------------- 1 | // 2 | // SoftwareView.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-5-14. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "SoftwareUnit.h" 11 | 12 | @interface SoftwareView : UIViewController 13 | { 14 | NSMutableArray * softwares; 15 | BOOL isLoading; 16 | BOOL isLoadOver; 17 | } 18 | 19 | @property (strong, nonatomic) IBOutlet UITableView *tableSoftwares; 20 | @property (retain, nonatomic) NSString * headTitle; 21 | @property (retain, nonatomic) NSString * searchTag; 22 | @property int tag; 23 | @property BOOL isSoftwareTagList; 24 | 25 | -(void)reload; 26 | -(void)reloadType; 27 | -(void)clear; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /oschina/SoftwaresBase.h: -------------------------------------------------------------------------------- 1 | // 2 | // SoftwaresBase.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-5-14. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "SoftwareView.h" 11 | #import "SoftwareTypeView.h" 12 | 13 | @interface SoftwaresBase : UIViewController 14 | 15 | @property (strong, nonatomic) UISegmentedControl * segment_Title; 16 | @property (strong, nonatomic) SoftwareView * softwareView; 17 | @property (strong, nonatomic) SoftwareTypeView * softwareTypeView; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /oschina/TBXML-Code/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/TBXML-Code/.DS_Store -------------------------------------------------------------------------------- /oschina/TBXML-Headers/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/TBXML-Headers/.DS_Store -------------------------------------------------------------------------------- /oschina/TBXML-Headers/TBXML+HTTP.h: -------------------------------------------------------------------------------- 1 | // 2 | // TBXML+HTTP.h 3 | // 4 | // Created by Tom Bradley on 29/01/2011. 5 | // Copyright 2012 71Squared All rights reserved. 6 | // 7 | 8 | #import "TBXML.h" 9 | 10 | typedef void (^TBXMLAsyncRequestSuccessBlock)(NSData *,NSURLResponse *); 11 | typedef void (^TBXMLAsyncRequestFailureBlock)(NSData *,NSError *); 12 | 13 | @interface NSMutableURLRequest (TBXML_HTTP) 14 | 15 | + (NSMutableURLRequest*) tbxmlGetRequestWithURL:(NSURL*)url; 16 | + (NSMutableURLRequest*) tbxmlPostRequestWithURL:(NSURL*)url parameters:(NSDictionary*)parameters; 17 | 18 | @end 19 | 20 | 21 | @interface NSURLConnection (TBXML_HTTP) 22 | 23 | + (void)tbxmlAsyncRequest:(NSURLRequest *)request success:(TBXMLAsyncRequestSuccessBlock)successBlock failure:(TBXMLAsyncRequestFailureBlock)failureBlock; 24 | 25 | @end 26 | 27 | 28 | @interface TBXML (TBXML_HTTP) 29 | 30 | + (id)tbxmlWithURL:(NSURL*)aURL success:(TBXMLSuccessBlock)successBlock failure:(TBXMLFailureBlock)failureBlock; 31 | - (id)initWithURL:(NSURL*)aURL success:(TBXMLSuccessBlock)successBlock failure:(TBXMLFailureBlock)failureBlock; 32 | 33 | @end 34 | 35 | 36 | -------------------------------------------------------------------------------- /oschina/TBXML-Support/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/TBXML-Support/.DS_Store -------------------------------------------------------------------------------- /oschina/TBXML-Support/TBXML-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'asfd' target in the 'asfd' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /oschina/TBXML-Support/TBXML-iOS-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'TBXML-iOS' target in the 'TBXML-iOS' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /oschina/TQImageCache.h: -------------------------------------------------------------------------------- 1 | // 2 | // TQImageCAche.h 3 | // 4 | // 5 | // Created by Tang Qiao on 12-5-9. 6 | // Copyright (c) 2012年 blog.devtang.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | typedef enum { 12 | kLastCacheKitStatusNotFound, 13 | kLastCacheKitStatusInMemory, 14 | kLastCacheKitStatusInDisk 15 | } LastCacheKitStatus; 16 | 17 | @interface TQImageCache : NSObject 18 | 19 | @property (nonatomic, assign) NSInteger maxMemoryCacheNumber; 20 | @property (nonatomic, assign) LastCacheKitStatus lastCacheKitStatus; 21 | @property (nonatomic, retain) NSString * cachePath; 22 | 23 | 24 | - (id) initWithCachePath:(NSString*)path andMaxMemoryCacheNumber:(NSInteger)maxNumber; 25 | 26 | - (void) putImage:(NSData *) imageData withName:(NSString*)imageName ; 27 | - (NSData *) getImage:(NSString *)imageName; 28 | - (void)clear; 29 | 30 | + (NSString *)parseUrlForCacheName:(NSString *)name; 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /oschina/TSEmojiView.h: -------------------------------------------------------------------------------- 1 | // 2 | // TSEmojiView.h 3 | // TSEmojiView 4 | // 5 | // Created by Shawn Ma on 7/24/12. 6 | // Copyright (c) 2012 Telenav Software, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol TSEmojiViewDelegate; 12 | @interface TSEmojiView : UIView 13 | 14 | @property (assign, nonatomic) id delegate; 15 | 16 | @end 17 | 18 | @protocol TSEmojiViewDelegate 19 | @optional 20 | - (void)didTouchEmojiView:(TSEmojiView*)emojiView touchedEmoji:(NSString*)string; 21 | @end 22 | -------------------------------------------------------------------------------- /oschina/Tweet.h: -------------------------------------------------------------------------------- 1 | // 2 | // Tweet.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-7. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "Tool.h" 11 | 12 | @interface Tweet : NSObject 13 | 14 | @property int _id; 15 | @property (nonatomic,copy) NSString * author; 16 | @property int authorID; 17 | @property (nonatomic,copy) NSString * tweet; 18 | @property (nonatomic,copy) NSString * fromNowOn; 19 | @property (nonatomic,copy) NSString * img; 20 | @property (nonatomic,retain) UIImage * imgData; 21 | @property int commentCount; 22 | @property (nonatomic,copy) NSString * imgTweet; 23 | @property (nonatomic,retain) UIImage * imgTweetData; 24 | @property (nonatomic,copy) NSString * imgBig; 25 | @property int appClient; 26 | @property int height; 27 | 28 | - (id)initWidthParameters:(int)newid 29 | andAuthor:(NSString *)newAuhtor 30 | andAuthorID:(int)newAuthorID 31 | andTweet:(NSString *)newTweet 32 | andFromNowOn:(NSString *)newFromNowOn 33 | andImg:(NSString *)img 34 | andCommentCount:(int)newCommentCount 35 | andImgTweet:(NSString *)nimgTweet 36 | andImgBig:(NSString *)nimgBig 37 | andAppClient:(int)nappClient; 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /oschina/Tweet.m: -------------------------------------------------------------------------------- 1 | // 2 | // Tweet.m 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-7. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "Tweet.h" 10 | 11 | @implementation Tweet 12 | 13 | @synthesize _id; 14 | @synthesize tweet; 15 | @synthesize author; 16 | @synthesize authorID; 17 | @synthesize fromNowOn; 18 | @synthesize img; 19 | @synthesize imgData; 20 | @synthesize commentCount; 21 | @synthesize imgTweet; 22 | @synthesize imgTweetData; 23 | @synthesize imgBig; 24 | @synthesize appClient; 25 | @synthesize height; 26 | 27 | - (id)initWidthParameters:(int)newid 28 | andAuthor:(NSString *)newAuthor 29 | andAuthorID:(int)newAuthorID 30 | andTweet:(NSString *)newTweet 31 | andFromNowOn:(NSString *)newFromNowOn 32 | andImg:(NSString *)newImg 33 | andCommentCount:(int)newCommentCount 34 | andImgTweet:(NSString *)nimgTweet 35 | andImgBig:(NSString *)nimgBig 36 | andAppClient:(int)nappClient 37 | { 38 | Tweet *t = [[Tweet alloc] init]; 39 | t._id = newid; 40 | t.author = newAuthor; 41 | t.authorID = newAuthorID; 42 | t.tweet = newTweet; 43 | t.fromNowOn = newFromNowOn; 44 | t.img = newImg; 45 | t.commentCount = newCommentCount; 46 | t.imgTweet = nimgTweet; 47 | t.imgBig = nimgBig; 48 | t.appClient = nappClient; 49 | UITextView *txt = [[UITextView alloc] initWithFrame:CGRectMake(157, 178, 236, 331)]; 50 | t.height = [Tool getTextViewHeight:txt andUIFont:[UIFont fontWithName:@"arial" size:14.0f] andText:t.tweet]; 51 | return t; 52 | } 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /oschina/TweetBase2.h: -------------------------------------------------------------------------------- 1 | // 2 | // TweetBase2.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-12. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "TwitterView.h" 11 | #import "PubTweet.h" 12 | 13 | @interface TweetBase2 : UIViewController 14 | 15 | @property (strong, nonatomic) UISegmentedControl * segment_title; 16 | @property (strong, nonatomic) TwitterView * twitterView; 17 | 18 | - (NSString *)getSegmentTitle; 19 | 20 | - (void)myInit; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /oschina/TweetCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // TweetCell.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-7. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "EGOImageView.h" 11 | 12 | @interface TweetCell : UITableViewCell 13 | 14 | @property (strong, nonatomic) IBOutlet UIImageView *img; 15 | @property (strong, nonatomic) IBOutlet UITextView *txt_Message; 16 | @property (strong, nonatomic) IBOutlet UILabel *lbl_Time; 17 | @property (strong, nonatomic) IBOutlet UILabel *lbl_Author; 18 | @property (strong, nonatomic) IBOutlet UILabel *lblCommentCount; 19 | @property (strong, nonatomic) IBOutlet UIImageView *imgTweet; 20 | //长按删除元素用 21 | @property (nonatomic,assign) id delegate; 22 | -(void)initGR; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /oschina/TweetCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // TweetCell.m 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-7. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "TweetCell.h" 10 | 11 | @implementation TweetCell 12 | @synthesize img; 13 | @synthesize txt_Message; 14 | @synthesize lbl_Time; 15 | @synthesize lbl_Author; 16 | @synthesize lblCommentCount; 17 | @synthesize imgTweet; 18 | @synthesize delegate; 19 | 20 | -(void)initGR 21 | { 22 | UILongPressGestureRecognizer *longPressGR = [[ UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(handleLongPress:)]; 23 | longPressGR.minimumPressDuration = 0.7; 24 | [self addGestureRecognizer:longPressGR]; 25 | } 26 | 27 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated 28 | { 29 | [super setSelected:selected animated:animated]; 30 | } 31 | 32 | -(BOOL)canBecomeFirstResponder 33 | { 34 | return YES; 35 | } 36 | -(void)handleLongPress:(UILongPressGestureRecognizer *)recognizer 37 | { 38 | if([self isHighlighted]) 39 | { 40 | [[self delegate] performSelector:@selector(showMenu:) withObject:self]; 41 | } 42 | } 43 | - (void)delete:(id)sender 44 | { 45 | [[self delegate] performSelector:@selector(deleteRow:) withObject:self]; 46 | } 47 | -(BOOL)canPerformAction:(SEL)action withSender:(id)sender 48 | { 49 | if(action == @selector(delete:)) 50 | { 51 | return YES; 52 | } 53 | else 54 | { 55 | return [super canPerformAction:action withSender:sender]; 56 | } 57 | } 58 | @end 59 | -------------------------------------------------------------------------------- /oschina/TweetDetail.h: -------------------------------------------------------------------------------- 1 | // 2 | // TweetDetail.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-14. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "Tweet.h" 11 | #import "Tool.h" 12 | #import "Notification_CommentCount.h" 13 | #import "TweetImgDetail.h" 14 | 15 | @interface TweetDetail : UIViewController 16 | 17 | @property (strong, nonatomic) IBOutlet UIWebView *webView; 18 | @property (strong, nonatomic) IBOutlet UITextView *txtComment; 19 | @property (strong, nonatomic) IBOutlet UISwitch *switchToZone; 20 | @property int tweetID; 21 | @property (retain,nonatomic) Tweet * singleTweet; 22 | 23 | - (IBAction)clickBackground:(id)sender; 24 | - (IBAction)changeSwitchToZone:(id)sender; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /oschina/TweetImgDetail.h: -------------------------------------------------------------------------------- 1 | // 2 | // TweetImgDetail.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-31. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "Tool.h" 11 | 12 | @interface TweetImgDetail : UIViewController 13 | 14 | @property (strong, nonatomic) IBOutlet UIWebView *webView; 15 | @property (copy,nonatomic) NSString * imgHref; 16 | @property (strong, nonatomic) IBOutlet UIToolbar *toolBar; 17 | 18 | - (IBAction)clickCloseThis:(id)sender; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /oschina/TweetImgDetail.m: -------------------------------------------------------------------------------- 1 | // 2 | // TweetImgDetail.m 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-31. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "TweetImgDetail.h" 10 | 11 | @implementation TweetImgDetail 12 | @synthesize toolBar; 13 | @synthesize webView; 14 | @synthesize imgHref; 15 | 16 | #pragma mark - View lifecycle 17 | 18 | - (void)viewDidLoad 19 | { 20 | [super viewDidLoad]; 21 | [Tool clearWebViewBackground:webView]; 22 | 23 | NSString *img = [NSString stringWithFormat:@"
", self.imgHref]; 24 | [self.webView loadHTMLString:img baseURL:nil]; 25 | 26 | if (IS_IPHONE_5) { 27 | self.toolBar.frame = CGRectMake(0, -88, 320, 44); 28 | } 29 | } 30 | - (void)clickCloseThis:(id)sender 31 | { 32 | [self dismissModalViewControllerAnimated:YES]; 33 | } 34 | 35 | - (void)viewDidUnload 36 | { 37 | [Tool ReleaseWebView:self.webView]; 38 | [self setWebView:nil]; 39 | [self setToolBar:nil]; 40 | [super viewDidUnload]; 41 | } 42 | 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /oschina/TweetPubCache.h: -------------------------------------------------------------------------------- 1 | // 2 | // TweetPubCache.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-5-16. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface TweetPubCache : NSObject 12 | 13 | @property (copy,nonatomic) NSString * tweetText; 14 | @property (retain,nonatomic) NSData * tweetImg; 15 | @property BOOL isFirstTime; 16 | @property (copy,nonatomic) NSString * key; 17 | 18 | + (TweetPubCache *)getTweetPubCacheByKey:(NSString *)nkey andArray:(NSArray *)datas; 19 | 20 | - (id)initWithParameters:(NSString *)text andImg:(NSData *)img andKey:(NSString *)nkey; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /oschina/TweetPubCache.m: -------------------------------------------------------------------------------- 1 | // 2 | // TweetPubCache.m 3 | // oschina 4 | // 5 | // Created by wangjun on 12-5-16. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "TweetPubCache.h" 10 | 11 | @implementation TweetPubCache 12 | 13 | @synthesize tweetText; 14 | @synthesize tweetImg; 15 | @synthesize isFirstTime; 16 | @synthesize key; 17 | 18 | + (TweetPubCache *)getTweetPubCacheByKey:(NSString *)nkey andArray:(NSArray *)datas 19 | { 20 | for (TweetPubCache *t in datas) { 21 | if ([t.key isEqualToString:nkey]) { 22 | return t; 23 | } 24 | } 25 | return nil; 26 | } 27 | 28 | - (id)initWithParameters:(NSString *)text andImg:(NSData *)img andKey:(NSString *)nkey 29 | { 30 | TweetPubCache * t = [[TweetPubCache alloc] init]; 31 | t.tweetImg = img; 32 | t.tweetText = text; 33 | t.isFirstTime = YES; 34 | t.key = nkey; 35 | return t; 36 | } 37 | 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /oschina/TweetView.h: -------------------------------------------------------------------------------- 1 | // 2 | // TweetView.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-5. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface TweetView : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /oschina/TwitterView.h: -------------------------------------------------------------------------------- 1 | // 2 | // TwitterView.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-6. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "Tweet.h" 11 | #import "TweetDetail.h" 12 | #import "TweetCell.h" 13 | #import "MessageSystemView.h" 14 | #import "Tool.h" 15 | #import "TweetBase2.h" 16 | #import "UITap.h" 17 | #import "EGOImageView.h" 18 | #import "EGORefreshTableHeaderView.h" 19 | #import "IconDownloader.h" 20 | #import "TQImageCache.h" 21 | 22 | @interface TwitterView : UIViewController 23 | { 24 | NSMutableArray * tweets; 25 | BOOL isLoading; 26 | BOOL isLoadOver; 27 | int allCount; 28 | 29 | //下拉刷新 30 | EGORefreshTableHeaderView *_refreshHeaderView; 31 | BOOL _reloading; 32 | 33 | BOOL isInitialize; 34 | TQImageCache * _iconCache; 35 | } 36 | 37 | //TableView 38 | @property (strong, nonatomic) IBOutlet UITableView *tableTweets; 39 | 40 | //异步加载图片 41 | @property (nonatomic, retain) NSMutableDictionary *imageDownloadsInProgress; 42 | @property (nonatomic, retain) NSMutableDictionary *tweetDownloadsInProgress; 43 | - (void)startIconDownload:(ImgRecord *)imgRecord forIndexPath:(NSIndexPath *)indexPath; 44 | - (void)startIconDownload2:(ImgRecord *)imgRecord forIndexPath:(NSIndexPath *)indexPath; 45 | 46 | //加载不同类型的动弹列表 最新/热门/我的 47 | //如果为0 则加载所有人最新的动弹 否则加载指定uid 的最新动弹 48 | @property int _uid; 49 | - (void)reloadUID:(int)newUID; 50 | - (void)reload:(BOOL)noRefresh; 51 | 52 | //清空列表 53 | - (void)clear; 54 | 55 | //下拉刷新 56 | - (void)refresh; 57 | - (void)reloadTableViewDataSource; 58 | - (void)doneLoadingTableViewData; 59 | 60 | @end 61 | -------------------------------------------------------------------------------- /oschina/UITap.h: -------------------------------------------------------------------------------- 1 | // 2 | // UITap.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-26. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UITap : UITapGestureRecognizer 12 | 13 | @property int tag; 14 | @property (nonatomic,copy) NSString * tagString; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /oschina/UITap.m: -------------------------------------------------------------------------------- 1 | // 2 | // UITap.m 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-26. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "UITap.h" 10 | 11 | @implementation UITap 12 | 13 | @synthesize tag; 14 | @synthesize tagString; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /oschina/UserActiveView.h: -------------------------------------------------------------------------------- 1 | // 2 | // UserActiveView.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-7-4. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "EGORefreshTableHeaderView.h" 11 | #import "QuadCurveMenu.h" 12 | #import "QuadCurveMenuItem.h" 13 | #import "UserView2.h" 14 | #import "UserInfoView.h" 15 | 16 | @interface UserActiveView : UIViewController 17 | { 18 | NSMutableArray *activies; 19 | BOOL isLoading; 20 | BOOL isLoadOver; 21 | int relationShip; 22 | 23 | int allCount; 24 | 25 | //下拉刷新 26 | EGORefreshTableHeaderView *_refreshHeaderView; 27 | BOOL _reloading; 28 | } 29 | @property (strong, nonatomic) IBOutlet UITableView *tableActivies; 30 | 31 | @property int hisUID; 32 | @property (nonatomic,retain) NSString * hisName; 33 | 34 | -(void)reload:(BOOL)isAllInfo andNoRefresh:(BOOL)noRefresh; 35 | 36 | //异步加载图片专用 37 | @property (nonatomic, retain) NSMutableDictionary *imageDownloadsInProgress; 38 | @property (nonatomic, retain) NSMutableDictionary *tweetDownloadsInProgress; 39 | -(void)startIconDownload:(ImgRecord *)imgRecord forIndexPath:(NSIndexPath *)indexPath; 40 | -(void)startIconDownload2:(ImgRecord *)imgRecord forIndexPath:(NSIndexPath *)indexPath; 41 | 42 | -(void)clear; 43 | //下拉刷新 44 | -(void)refresh; 45 | -(void)reloadTableViewDataSource; 46 | -(void)doneLoadingTableViewData; 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /oschina/UserBlogsView.h: -------------------------------------------------------------------------------- 1 | // 2 | // UserBlogsView.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-7-3. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "BlogUnit.h" 11 | #import "Tool.h" 12 | 13 | @interface UserBlogsView : UIViewController 14 | { 15 | NSMutableArray * blogs; 16 | BOOL isLoading; 17 | BOOL isLoadOver; 18 | int allCount; 19 | 20 | //下拉刷新 21 | EGORefreshTableHeaderView *_refreshHeaderView; 22 | BOOL _reloading; 23 | } 24 | 25 | @property int authorUID; 26 | @property (retain,nonatomic) NSString * authorName; 27 | 28 | @property (strong, nonatomic) IBOutlet UITableView *tableBlogs; 29 | 30 | -(void)reload:(BOOL)noRefresh; 31 | -(void)clear; 32 | //下拉刷新 33 | -(void)refresh; 34 | -(void)reloadTableViewDataSource; 35 | -(void)doneLoadingTableViewData; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /oschina/UserInfoView.h: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /oschina/UserView2.h: -------------------------------------------------------------------------------- 1 | // 2 | // UserView2.h 3 | // oschina 4 | // 5 | // Created by wangjun on 12-7-5. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "QuadCurveMenu.h" 11 | #import "QuadCurveMenuItem.h" 12 | #import "UserActiveView.h" 13 | #import "UserBlogsView.h" 14 | #import "EGOImageView.h" 15 | #import "SettingModel.h" 16 | #import "MyInfoCell.h" 17 | 18 | @interface UserView2 : UIViewController 19 | 20 | @property int hisUID; 21 | @property (retain,nonatomic) NSString * hisName; 22 | 23 | @property (strong,nonatomic) EGOImageView * egoImgView; 24 | @property int relationShip; 25 | @property (strong,nonatomic) UIBarButtonItem * btnRelation; 26 | - (IBAction)click_AT:(id)sender; 27 | - (IBAction)click_PubMesssge:(id)sender; 28 | @property (strong, nonatomic) IBOutlet UITableView * tableInfo; 29 | @property (nonatomic, retain) NSArray * infos; 30 | -(void)getUserInfo; 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /oschina/Views/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/Views/.DS_Store -------------------------------------------------------------------------------- /oschina/Views/UAGradientBackground.h: -------------------------------------------------------------------------------- 1 | // 2 | // UAGradientBackground.h 3 | // UAModalPanel 4 | // 5 | // Created by Matt Coneybeare on 1/8/12. 6 | // Copyright (c) 2012 Urban Apps. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | typedef enum { 12 | UAGradientBackgroundStyleRadial = 0, 13 | UAGradientBackgroundStyleRadialReversed, 14 | UAGradientBackgroundStyleLinear, 15 | UAGradientBackgroundStyleLinearReversed, 16 | UAGradientBackgroundStyleCenterHighlight, 17 | } UAGradientBackgroundStyle; 18 | 19 | typedef enum { 20 | UAGradientLineModeNone = 0, 21 | UAGradientLineModeTop = 2, 22 | UAGradientLineModeBottom = 4, 23 | UAGradientLineModeTopAndBottom = 8 24 | } UAGradientLineMode; 25 | 26 | @interface UAGradientBackground : UIView { 27 | UAGradientBackgroundStyle gradientStyle; 28 | UAGradientLineMode lineMode; 29 | CGFloat *colorComponents; 30 | } 31 | 32 | @property (nonatomic, assign) UAGradientBackgroundStyle gradientStyle; 33 | @property (nonatomic, assign) UAGradientLineMode lineMode; 34 | 35 | - (id)initWithFrame:(CGRect)frame style:(UAGradientBackgroundStyle)aStyle color:(CGFloat *)components lineMode:(UAGradientLineMode)lineModes; 36 | - (id)initWithFrame:(CGRect)frame color:(CGFloat *)components; 37 | - (id)initWithFrame:(CGRect)frame style:(UAGradientBackgroundStyle)aStyle; 38 | - (id)initWithFrame:(CGRect)frame; 39 | 40 | - (void)setColorComponents:(CGFloat *)components; 41 | 42 | + (id)gradientWithFrame:(CGRect)frame style:(UAGradientBackgroundStyle)aStyle color:(CGFloat *)components lineMode:(UAGradientLineMode)lineModes; 43 | + (id)gradientWithFrame:(CGRect)frame color:(CGFloat *)components; 44 | + (id)gradientWithFrame:(CGRect)frame style:(UAGradientBackgroundStyle)aStyle; 45 | + (id)gradientWithFrame:(CGRect)frame; 46 | @end 47 | -------------------------------------------------------------------------------- /oschina/Views/UANoisyGradientBackground.h: -------------------------------------------------------------------------------- 1 | // 2 | // UANoisyGradientBackground.h 3 | // UAModalPanel 4 | // 5 | // Created by Matt Coneybeare on 1/8/12. 6 | // Copyright (c) 2012 Urban Apps. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "UAGradientBackground.h" 11 | 12 | @interface UANoisyGradientBackground : UAGradientBackground { 13 | CGFloat noiseOpacity; 14 | CGBlendMode blendMode; 15 | } 16 | 17 | @property (nonatomic, assign) CGFloat noiseOpacity; 18 | @property (nonatomic, assign) CGBlendMode blendMode; 19 | 20 | - (id)initWithFrame:(CGRect)frame style:(UAGradientBackgroundStyle)aStyle color:(CGFloat *)components lineMode:(UAGradientLineMode)lineModes noiseOpacity:(CGFloat)opacity blendMode:(CGBlendMode)mode; 21 | - (id)initWithFrame:(CGRect)frame noiseOpacity:(CGFloat)opacity; 22 | - (id)initWithFrame:(CGRect)frame blendMode:(CGFloat)mode; 23 | 24 | + (id)gradientWithFrame:(CGRect)frame style:(UAGradientBackgroundStyle)aStyle color:(CGFloat *)components lineMode:(UAGradientLineMode)lineModes noiseOpacity:(CGFloat)opacity blendMode:(CGBlendMode)mode; 25 | + (id)gradientWithFrame:(CGRect)frame noiseOpacity:(CGFloat)opacity; 26 | + (id)gradientWithFrame:(CGRect)frame blendMode:(CGFloat)mode; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /oschina/Views/UARoundedRectView.h: -------------------------------------------------------------------------------- 1 | // 2 | // UARoundedRectView.h 3 | // UAModalPanel 4 | // 5 | // Created by Matt Coneybeare on 1/8/12. 6 | // Copyright (c) 2012 Urban Apps. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface UARoundedRectView : UIView { 13 | NSInteger radius; 14 | CGFloat *colorComponents; 15 | } 16 | 17 | @property (nonatomic, assign) NSInteger radius; 18 | 19 | - (void)setColors:(CGFloat *)components; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /oschina/Views/UARoundedRectView.m: -------------------------------------------------------------------------------- 1 | // 2 | // UARoundedRectView.m 3 | // UAModalPanel 4 | // 5 | // Created by Matt Coneybeare on 1/8/12. 6 | // Copyright (c) 2012 Urban Apps. All rights reserved. 7 | // 8 | 9 | #import "UARoundedRectView.h" 10 | #import 11 | 12 | @implementation UARoundedRectView 13 | 14 | @synthesize radius; 15 | 16 | + (Class)layerClass { 17 | return [CAGradientLayer class]; 18 | } 19 | - (id)initWithFrame:(CGRect)frame { 20 | if ((self = [super initWithFrame:frame])) { 21 | self.backgroundColor = [UIColor clearColor]; 22 | 23 | colorComponents = NSZoneMalloc(NSDefaultMallocZone(), 8*sizeof(CGFloat)); 24 | for (int i = 0; i < 8; i++) { 25 | colorComponents[i] = 1.0; 26 | } 27 | } 28 | return self; 29 | } 30 | 31 | - (void)setColors:(CGFloat *)components { 32 | for (int i = 0; i < 8; i++) { 33 | colorComponents[i] = components[i]; 34 | } 35 | 36 | CAGradientLayer *gradientLayer = (CAGradientLayer *)self.layer; 37 | gradientLayer.colors = 38 | [NSArray arrayWithObjects: 39 | (id)[UIColor colorWithRed:colorComponents[0] green:colorComponents[1] blue:colorComponents[2] alpha:colorComponents[3]].CGColor, 40 | (id)[UIColor colorWithRed:colorComponents[4] green:colorComponents[5] blue:colorComponents[6] alpha:colorComponents[7]].CGColor, 41 | nil]; 42 | 43 | } 44 | 45 | - (void)setRadius:(NSInteger)rad { 46 | radius = rad; 47 | CAGradientLayer *gradientLayer = (CAGradientLayer *)self.layer; 48 | gradientLayer.cornerRadius = rad*1.0f; 49 | } 50 | 51 | - (void)dealloc { 52 | NSZoneFree(NSDefaultMallocZone(), colorComponents); 53 | [super dealloc]; 54 | } 55 | 56 | 57 | @end 58 | -------------------------------------------------------------------------------- /oschina/aboutbg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/aboutbg.jpg -------------------------------------------------------------------------------- /oschina/aboutbg1136.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/aboutbg1136.jpg -------------------------------------------------------------------------------- /oschina/account@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/account@2x.png -------------------------------------------------------------------------------- /oschina/active@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/active@2x.png -------------------------------------------------------------------------------- /oschina/answer@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/answer@2x.png -------------------------------------------------------------------------------- /oschina/answerunit3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/answerunit3.png -------------------------------------------------------------------------------- /oschina/avatar_loading.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/avatar_loading.jpg -------------------------------------------------------------------------------- /oschina/avatar_noimg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/avatar_noimg.jpg -------------------------------------------------------------------------------- /oschina/bg-addbutton-highlighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/bg-addbutton-highlighted.png -------------------------------------------------------------------------------- /oschina/bg-addbutton-highlighted@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/bg-addbutton-highlighted@2x.png -------------------------------------------------------------------------------- /oschina/bg-addbutton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/bg-addbutton.png -------------------------------------------------------------------------------- /oschina/bg-addbutton@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/bg-addbutton@2x.png -------------------------------------------------------------------------------- /oschina/bg-menuitem-highlighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/bg-menuitem-highlighted.png -------------------------------------------------------------------------------- /oschina/bg-menuitem-highlighted@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/bg-menuitem-highlighted@2x.png -------------------------------------------------------------------------------- /oschina/bg-menuitem.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/bg-menuitem.png -------------------------------------------------------------------------------- /oschina/bg-menuitem@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/bg-menuitem@2x.png -------------------------------------------------------------------------------- /oschina/big_avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/big_avatar.png -------------------------------------------------------------------------------- /oschina/big_avatar_loading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/big_avatar_loading.png -------------------------------------------------------------------------------- /oschina/blueArrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/blueArrow.png -------------------------------------------------------------------------------- /oschina/blueArrow@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/blueArrow@2x.png -------------------------------------------------------------------------------- /oschina/bubbleMine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/bubbleMine.png -------------------------------------------------------------------------------- /oschina/bubbleMine@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/bubbleMine@2x.png -------------------------------------------------------------------------------- /oschina/bubbleSomeone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/bubbleSomeone.png -------------------------------------------------------------------------------- /oschina/bubbleSomeone@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/bubbleSomeone@2x.png -------------------------------------------------------------------------------- /oschina/comment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/comment.png -------------------------------------------------------------------------------- /oschina/commentlist@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/commentlist@2x.png -------------------------------------------------------------------------------- /oschina/detail@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/detail@2x.png -------------------------------------------------------------------------------- /oschina/en.lproj/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/en.lproj/.DS_Store -------------------------------------------------------------------------------- /oschina/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /oschina/enormego-EGOImageLoading-9a3fa6b/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/enormego-EGOImageLoading-9a3fa6b/.DS_Store -------------------------------------------------------------------------------- /oschina/exit@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/exit@2x.png -------------------------------------------------------------------------------- /oschina/faceIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/faceIcon.png -------------------------------------------------------------------------------- /oschina/feedback@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/feedback@2x.png -------------------------------------------------------------------------------- /oschina/icon-plus-highlighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/icon-plus-highlighted.png -------------------------------------------------------------------------------- /oschina/icon-plus-highlighted@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/icon-plus-highlighted@2x.png -------------------------------------------------------------------------------- /oschina/icon-plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/icon-plus.png -------------------------------------------------------------------------------- /oschina/icon-plus@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/icon-plus@2x.png -------------------------------------------------------------------------------- /oschina/icon-star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/icon-star.png -------------------------------------------------------------------------------- /oschina/icon-star@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/icon-star@2x.png -------------------------------------------------------------------------------- /oschina/info@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/info@2x.png -------------------------------------------------------------------------------- /oschina/k.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/k.png -------------------------------------------------------------------------------- /oschina/logo@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/logo@2x.png -------------------------------------------------------------------------------- /oschina/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // oschina 4 | // 5 | // Created by wangjun on 12-3-1. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "OSAppDelegate.h" 12 | 13 | int main(int argc, char *argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([OSAppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /oschina/man.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/man.png -------------------------------------------------------------------------------- /oschina/microcomment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/microcomment.png -------------------------------------------------------------------------------- /oschina/more@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/more@2x.png -------------------------------------------------------------------------------- /oschina/oschina-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | zh_CN 7 | CFBundleDisplayName 8 | 开源中国 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | net.oschina.iosapp 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.7.0 23 | LSRequiresIPhoneOS 24 | 25 | UIRequiredDeviceCapabilities 26 | 27 | UISupportedInterfaceOrientations 28 | 29 | UIInterfaceOrientationPortrait 30 | 31 | UIPrerenderedIcon 32 | 33 | UIStatusBarHidden 34 | 35 | CFBundleIconFiles 36 | 37 | Icon@2x 38 | Icon 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /oschina/portraitbody.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/portraitbody.png -------------------------------------------------------------------------------- /oschina/question24@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/question24@2x.png -------------------------------------------------------------------------------- /oschina/rating@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/rating@2x.png -------------------------------------------------------------------------------- /oschina/search@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/search@2x.png -------------------------------------------------------------------------------- /oschina/searchWhite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/searchWhite@2x.png -------------------------------------------------------------------------------- /oschina/setting@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/setting@2x.png -------------------------------------------------------------------------------- /oschina/share@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/share@2x.png -------------------------------------------------------------------------------- /oschina/share_sina.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/share_sina.png -------------------------------------------------------------------------------- /oschina/share_tencent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/share_tencent.png -------------------------------------------------------------------------------- /oschina/software@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/software@2x.png -------------------------------------------------------------------------------- /oschina/tweet24@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/tweet24@2x.png -------------------------------------------------------------------------------- /oschina/tweet@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/tweet@2x.png -------------------------------------------------------------------------------- /oschina/tweetloading.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/tweetloading.jpg -------------------------------------------------------------------------------- /oschina/userInfo@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/userInfo@2x.png -------------------------------------------------------------------------------- /oschina/weibo@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/weibo@2x.png -------------------------------------------------------------------------------- /oschina/woman.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oschina/iphone-app/bb026bfcf2e79e5658e4e07cec6f2b5ecd078616/oschina/woman.png --------------------------------------------------------------------------------