Giter Site home page Giter Site logo

gavinkwoe / beeframework Goto Github PK

View Code? Open in Web Editor NEW
3.3K 390.0 1.1K 27.64 MB

[Experimental] A semi-hybrid framework that allows you to create mobile apps using Objective-C and XML/CSS

License: MIT License

C++ 1.76% Objective-C 66.19% Objective-C++ 7.54% Groff 0.06% C 24.45%

beeframework's Issues

对手册的几点建议

1,手册就是单单一个pdf文档,没有目录,显得很不专业。绝大部分api发布,都有详细的类\接口等等定义文档,而这里却找不到,让人感觉无从下手(这个最重要)
2,手册中存在多个错误,如(3,如何安装,将/framework 拖拽进工程,这个步骤是不行的。这让开发者从一开始就变得很沮丧。如修改C Mian的说明:UIApplicationMain( argc, argv, nil @”AppDelegate” ); 这里nil后面是不是少了一个,号?,还有其它一些错误,不一一列举
3,内容太零散,很难组织逻辑。开头写得很好,里面的组织却一片乱。让人有点雾里面看花的感觉,一遍又一遍看才能看出一点眉目
4,重要点没有说清楚 只顾贴代码没有详细的说明为什么要写?要写在哪里?
5,Demo注释太少,看了一下,基本没有注释!既然是一个DEMO,就应该尽量快的让人看懂,关键的地方加一下注释,起的作用是很重要的(实现上,就是我们自己写的代码,如果没有加注释,隔一段时间后也会忘记的)
6,Demo太少(这个问题不是关键,主要是手册的问题,手册弄好了,加入开发的人自然多了,Demo自然就有了。)
7,官方github还存在很多的空链接

总结:Bee的思路是一个全新的思路,非常好,可惜的是文档组织不好,没有详细的API接口文档,DEMO缺少必要的注释,让人感觉不敬业,只是玩玩而已
建议:可以参考国内thinkphp.cn的手册的写法,非常详细,非常友好

Bee example 崩溃

代码是2013/8/8号,从Mater下载的

  1. 在 Menu里,点击"Tuorial" 按钮
  2. 在Turial里,点击"Lesson 4" 按钮
  3. 在"Lesson 4"里,点击左上角的"<"按钮"

如果还没崩溃,重复第二和第三步

Compile error: override hash

When compile dribbble, complier show me error bellow:
"type of property 'hash' ('NSUInteger' (aka 'unsigned int')) does not match type of accessor 'hash' ('NSString *')
if ( self.element.hash )" in CSSStyleSelector.m

Temporarily avoid this problem by replace element.hash with [element hash]

求助:旋转BeeUIButton时,背景图片变形了

在模仿qq空间底部+号功能时,旋转+号按钮背景图变形。
[UIView animateWithDuration:0.5 animations:^{
self.button.transform = CGAffineTransformMakeRotation(M_PI * 45.0f / 180.0f);
} completion:^(BOOL finished){
}];
当角度是90或180时,不会变形,因为旋转后的尺寸刚好与原尺寸一致,但是45或135时,图片不显示,其他尺寸拉变形了。

ASR mode not compatible with ios 7.1.2 in real device

set bee.ui.config.ASR = YES;

connect your iphone with MAC, and run example on device, it reports:

CLTilesManagerClient: XPC_ERROR_CONNECTION_INVALID!

and

EXC_BAD_ACCESS code =1

when set ASR=NO, all errors gone.

bee的忠实使用者,遇到了几个问题,能否帮我分析下

1.beeuialertview crash
self = [super initWithTitle:nil message:nil delegate:nil cancelButtonTitle:nil otherButtonTitles:nil];
如果换成下面的self = [super init];则ok
2.statusbar颜色好像写死了,得手动更改颜色
3.weixin sdk无法分享,得替换lib
4.beeuibutton event,如果重新设置事件,上一个事件最好移除
5.AsiformDataRequest post 图片时,因为不带文件后缀,有些服务器收不到图片
6.UIViewController+UINavigationBar - (void)showBarButton:(NSInteger)position custom:(UIView *)view函数未完成
7.ios7,navigationbar back item无法使用,导致在ios7上无法右滑pop stack
8.按钮在某些情况下,touchupinside时,无法及时响应touch高亮

本人能力有限,有可能以上只是我使用方法不对,希望能得到你的帮助

crash: for lesson14

iOS 5.0 device

  • thread #1: tid = 0x1c03, 0x30ce3e58 CoreFoundationCFRetain + 20, stop reason = EXC_BAD_ACCESS (code=EXC_ARM_DA_ALIGN, address=0x2105a1) frame #0: 0x30ce3e58 CoreFoundationCFRetain + 20
    frame #1: 0x30d60a9c CoreFoundation__CFDictionaryStandardRetainValue + 68 frame #2: 0x30db3374 CoreFoundation**CFBasicHashAddValue + 1552
    frame #3: 0x30ce61b4 CoreFoundationCFBasicHashSetValue + 3020 frame #4: 0x30ce55ba CoreFoundationCFDictionarySetValue + 198
    frame #5: 0x30cf2ae6 CoreFoundation-[__NSPlaceholderDictionary initWithObjects:forKeys:count:] + 1178 frame #6: 0x30cfb3b2 CoreFoundation+[NSDictionary dictionaryWithObject:forKey:] + 50
    frame #7: 0x00210798 WhatsBug__22-[BeeUIStyle PROPERTY]_block_invoke(, first=0x0026b690) + 504 at Bee_UIStyle.m:129 frame #8: 0x00218fea WhatsBug-[Lesson14Board handleUISignal_BeeUIBoard:](self=0x0d8a5170, _cmd=0x00221819, signal=0x0d8993c0) + 4378 at Lesson14Board.m:54
    frame #9: 0x30cfa1fa CoreFoundation-[NSObject performSelector:withObject:] + 42 frame #10: 0x00155ed8 WhatsBug-[BeeUISignal routes](self=0x0d8993c0, _cmd=0x3792453a) + 1080 at Bee_UISignal.m:325
    frame #11: 0x00155624 WhatsBug-[BeeUISignal send](self=0x0d8993c0, _cmd=0x339c4074) + 1540 at Bee_UISignal.m:204 frame #12: 0x0018047a WhatsBug-[UIViewController(self=0x0d8a5170, _cmd=0x0022643b, name=0x0d88fea0, object=0x00000000, source=0x0d8a5170) sendUISignal:withObject:from:] + 326 at UIViewController+BeeUISignal.m:85
    frame #13: 0x001802ea WhatsBug-[UIViewController(self=0x0d8a5170, _cmd=0x0022662e, name=0x0d88fea0) sendUISignal:] + 66 at UIViewController+BeeUISignal.m:68 frame #14: 0x0017383a WhatsBug-[BeeUIBoard createViews](self=0x0d8a5170, _cmd=0x00229831) + 162 at Bee_UIBoard.m:697
    frame #15: 0x001731aa WhatsBug-[BeeUIBoard viewDidLoad](self=0x0d8a5170, _cmd=0x33991202) + 198 at Bee_UIBoard.m:555 frame #16: 0x335d2e32 UIKit-[UIViewController view] + 166
    frame #17: 0x335df390 UIKit-[UIViewController contentScrollView] + 24 frame #18: 0x335df200 UIKit-[UINavigationController _computeAndApplyScrollContentInsetDeltaForViewController:] + 36
    frame #19: 0x335df0e6 UIKit-[UINavigationController _layoutViewController:] + 34 frame #20: 0x335de968 UIKit-[UINavigationController _startTransition:fromViewController:toViewController:] + 500
    frame #21: 0x335de6aa UIKit-[UINavigationController _startDeferredTransitionIfNeeded] + 250 frame #22: 0x335d2ca6 UIKit-[UINavigationController pushViewController:transition:forceImmediate:] + 806
    frame #23: 0x02cf12a6 UIKit-[UINavigationControllerAccessibility(SafeCategory) pushViewController:transition:forceImmediate:] + 50 frame #24: 0x335d297c UIKit-[UINavigationController pushViewController:animated:] + 36
    frame #25: 0x00178a28 WhatsBug-[BeeUIStack pushBoard:animated:animationType:](self=0x00409a20, _cmd=0x0022a2ad, newBoard=0x0d8a5170, animated='\x01', type=0) + 432 at Bee_UIStack.m:203 frame #26: 0x00178870 WhatsBug-[BeeUIStack pushBoard:animated:](self=0x00409a20, _cmd=0x00221805, board=0x0d8a5170, animated='x01') + 124 at Bee_UIStack.m:187
    frame #27: 0x000e6168 WhatsBug-[CatelogBoard tableView:didSelectRowAtIndexPath:](self=0x0d85f030, _cmd=0x33989877, tableView=0x0cb2c600, indexPath=0x0d8ea150) + 416 at CatelogBoard.m:164 frame #28: 0x3364bae4 UIKit-[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] + 944
    frame #29: 0x336c57aa UIKit-[UITableView _userSelectRowAtPendingSelectionIndexPath:] + 158 frame #30: 0x305f8932 Foundation__NSFireDelayedPerform + 414
    frame #31: 0x30d6fa32 CoreFoundation__CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION** + 14 frame #32: 0x30d6f698 CoreFoundation__CFRunLoopDoTimer + 364
    frame #33: 0x30d6e26e CoreFoundation__CFRunLoopRun + 1206 frame #34: 0x30cf14a4 CoreFoundationCFRunLoopRunSpecific + 300
    frame #35: 0x30cf136c CoreFoundationCFRunLoopRunInMode + 104 frame #36: 0x33e88438 GraphicsServicesGSEventRunModal + 136
    frame #37: 0x335c7e7c UIKitUIApplicationMain + 1080 frame #38: 0x000e494e WhatsBugmain(argc=1, argv=0x2fee0d34) + 162 at main.m:37
    frame #39: 0x000e44f8 WhatsBug`start + 40

ipad landscape模式下,view返回的frame有问题

我创建了一个iPad应用,设置为只能横屏显示。
又创建了一个继承BeeUIBoard的类,在

- (void)handleUISignal_BeeUIBoard:(BeeUISignal *)signal
{
if ( [signal is:BeeUIBoard.LAYOUT_VIEWS] )
{
BeeLog(@"frame %@",NSStringFromCGRect(self.viewBound;));
}
}

应该打印出的日志是: 0,0,1004,768,但实际打印出来的是:0,0,768,1004.
我想这应该是一个bug,估计是没有判断当前的屏幕模式导致的。

Bee Interface Builder

编辑xml文件过程中,被删除的字符和光标所在的位置对不上!不知道是什么原因

下个版本能否支持一下ARC

试着用了一下,全都是ARC的错误,现在大家都在用ARC了,这么多文件,加-fno-objc-arc,会加死人的。

ARC

It's really cool if it can support ARC, and..... Shafa, Zhi Chi Lou Zhu

css样式多重时无效

举例:
现有底部条两个按钮,点击时,添加或移除image的active样式,来显示改变选中状态下图片和文字高亮。
/active style/
.active+.item-text{color:#7dbdd5;}
.item-icon-me.active{image-src:url(footer_me_active.png);}
.item-icon-setting.active{image-src:url(footer_setting_active.png);}
.m文件中:

  • (void)selectItem:(NSString *)itemName
    {
    $(@".item-icon").REMOVE_CLASS(@"active");
    NSString *cls = [@".item-icon-" stringByAppendingString:itemName];
    $(cls).ADD_CLASS(@"active");
    self.RELAYOUT();
    }
    ON_SIGNAL2(setting, signal)
    {
    [self selectItem:@"setting"];
    }
    启动运行时,样式显示正确,“我”项为激活状态,但是点击“设置”时,图片均失去激活状态,设置图片没有激活,而文字激活状态还保持在“我”上,没有任何变化。是否对这种“.item-icon-setting.active”支持不好?

(PS:尝试分别定义不同的激活样式名如:.active-me、.active-setting方才实现。)

Property 'userAgent' not found on object of type 'BeeHTTPRequest *'

pod安装完后直接编译报错:
/Users/xxxxx/Pods/BeeFramework/framework/system/network/http/client/Bee_HTTPRequest.m:233:8: Property 'userAgent' not found on object of type 'BeeHTTPRequest *'
注释掉那一行可以通过编译,不知道是否有其他影响

环境:
xcode5.1 SDK7.1
OS X 10.8.5

pod file:
platform :ios, '6.0'
pod 'BeeFramework', :head

Sometimes ASIHttpRequest sent twice on IOS6.0

workaround:
set
[request setShouldAttemptPersistentConnection:NO];
in

  • (BeeHTTPRequest *)GET:(NSString *)url sync:(BOOL)sync // since I only use GET.

I did not dig deeper. so maybe you guys should fix it.

cocospods 安装bee 错误

  1. xcode5 使用cocospods 安装bee 。

之前可以使用-fno-objc-arc 。但是用bee 后。build phases 中找不到设置的地方。

ios4.3运行不了WhatsBug

Xcode 4.5.2 , iOS4.3,运行不了。5.0以上可以

2012-11-22 10:18:16.205 WhatsBug[1769:d203] *** NSInvocation: warning: object 0x122ecc of class 'BeeDebugger' does not implement methodSignatureForSelector: -- trouble ahead
2012-11-22 10:18:16.206 WhatsBug[1769:d203] *** NSInvocation: warning: object 0x122ecc of class 'BeeDebugger' does not implement doesNotRecognizeSelector: -- abort

breakpoint not work in arm64

  • (void)breakPoint
    {
    #if BEE_DEVELOPMENT
    #if defined(ppc)
    asm("trap");
    #elif defined(i386)
    asm("int3");
    #endif // #elif defined(i386)
    #endif // #if BEE_DEVELOPMENT
    }

may be change like this:

  • (void)breakPoint
    {
    #if BEE_DEVELOPMENT
    #if defined(ppc)
    asm("trap");
    #elif defined(i386) || defined(amd64)
    asm("int3");
    #endif // #elif defined(i386)
    #endif // #if BEE_DEVELOPMENT
    }

随机排序的查询RANDOM(),RAND()

  • (BeeDatabase *)orderRandomBy:(NSString *)by
    {
    return [self orderBy:by direction:@"RAND()"];
    }

DB Error: 1 "no such function: RAND" ,应该改为 RANDOM(),sqlite内建函数和其他sql数据库内建函数有一点点区别

load method was called two times

the code i download from Master on 8/8/2013
In the example code, the load method in DribbbleBoard_iPhone was called two times.
The reason is the following:
In Bee_UIBoard init method it will first call
self = [super init] // in this method it will call UIViewController init
UIViewController init // in this method it will call BeeUIBoard initWithNibName:bundle:
BeeUIBoard initWithNibName:bundle://in this method, it will call the [self load]
self load
In Bee_UIBoard init method it will call the [self load] method again on the tail of the method.

BeeUITipsView Bug DisAppear 信号出不出来

  • (void)didAppearingAnimationDone
    {
    if ( NO == _tipsAppear.useMask )
    {
    _maskView.alpha = 0.0f;
    [_maskView removeFromSuperview];
    }

    [_tipsDisappear removeFromSuperview];
    _tipsDisappear = nil;

    [_tipsAppear internalDidAppear];
    [_tipsDisappear internalDidDisappear];
    }

_tipsDisappear 对像在使用前被释放了。所以DisAppear的消息也发不出来了。

Property 'userAgent' not found

Thanks for your sharing first .
These days I got some error message: Property 'userAgent' not found on object of type 'BeeHTTPRequest *'.
But it can be built success when a sentence was delete that is “self.userAgent = [BeeHTTPClientConfig sharedInstance].userAgent;”.
I hope it useful for you to work it out.

为什么我运行例子emaple会出现错误

UIViewController+BeeUISignal.m
line 44

  • (void)handleUISignal:(BeeUISignal *)signal
    {
    if ( signal.arrived )
    return;
    ....
    EXC_BAD_ACCESS
    我用po查看你的signal 信息如下
    (lldb) po singal
    po singal
    error: use of undeclared identifier 'singal'
    error: 1 errors parsing expression
    error: use of undeclared identifier 'singal'
    error: 1 errors parsing expression

xcode6 Undefined symbols for architecture armv7: "_OBJC_CLASS_$_BeeUIApplication

Undefined symbols for architecture armv7:
"OBJC_CLASS$_BeeUIApplication", referenced from:
objc-class-ref in Bee_Service.o
"OBJC_CLASS$_BeeViewModel", referenced from:
OBJC_CLASS$_BeePagingViewModel in Bee_PagingViewModel.o
OBJC_CLASS$_BeeStreamViewModel in Bee_StreamViewModel.o
"OBJC_METACLASS$_BeeViewModel", referenced from:
OBJC_METACLASS$_BeePagingViewModel in Bee_PagingViewModel.o
OBJC_METACLASS$_BeeStreamViewModel in Bee_StreamViewModel.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

想问下

文件里面的那个bee标识是手动拼成的还是有什么工具可以自动生成?

xcode6.1上面编译又是一坨的错误 什么原因啊 编译的时候

Undefined symbols for architecture armv7:
"OBJC_CLASS$_BeeUIApplication", referenced from:
objc-class-ref in Bee_Service.o
"OBJC_CLASS$_BeeViewModel", referenced from:
OBJC_CLASS$_BeePagingViewModel in Bee_PagingViewModel.o
OBJC_CLASS$_BeeStreamViewModel in Bee_StreamViewModel.o
"OBJC_METACLASS$_BeeViewModel", referenced from:
OBJC_METACLASS$_BeePagingViewModel in Bee_PagingViewModel.o
OBJC_METACLASS$_BeeStreamViewModel in Bee_StreamViewModel.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

查看了具体代码 问题在

if (TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR)

endif

这里 不知道怎么办了

ASI版本问题

与官方版本冲突。不知道你是不是有手动修改了ASIHTTPRequest的代码?
希望能将External下面的都采用官方版本。

CGRectFromString bug

CGRectFromString 进行了错误的格式解析。不知道是过期了还是另有用处。
现在的格式应该是类似这样:{{1, 2}, {3, 4}}
测试代码:

CGRect rc = {{1,2},{3,4}};
INFO(@"test %@",NSStringFromCGRect(rc));
rc = CGRectFromString(NSStringFromCGRect(rc));
INFO(@"test %@",NSStringFromCGRect(rc));

多图片上传怎么写

msg.HTTP_POST( requestURI ).PARAM(@"uid",uid)
.FILE_JPG_ALIAS(@"filepath", img1, @"temp.jpg")
.FILE_JPG_ALIAS(@"filepath", img2, @"temp.jpg");

以上可以实现两种图片,当我图片不固定数量的时候怎么处理呢?具体的代码怎么写?

scaffold

github 和自己编译的
都是这个样子

$ ./scaffold schema build ./example/dribbble.json
[INFO] Loading tables ...
[INFO] Loading services ...

Usage:
bee [arguments ...]

Commands:
version
help
schema build
schema build
schema test
schema test

Example:
bee schema build my.json ~/Desktop
bee schema test my.json

布局文件里无法修改Button的字体大小

重现:

    <linear orientation="h" class="container">
        <button id="signin" >test</button>
    </linear>
   <style type="text/css">
    #signin{
    font-size: 40px;
    }
  </style>

问题:按钮字体无法变成40px的

修复:

git diff ../../../framework/mvc/view/css/extension/UIButton+BeeUIStyle.m
diff --git a/iOS/framework/mvc/view/css/extension/UIButton+BeeUIStyle.m b/iOS/framework/mvc/view/css/extension/UIButton+BeeUIStyle.m
index 5161757..366912d 100644
--- a/iOS/framework/mvc/view/css/extension/UIButton+BeeUIStyle.m
+++ b/iOS/framework/mvc/view/css/extension/UIButton+BeeUIStyle.m
@@ -218,13 +218,13 @@
        UIFont * font = [properties parseFont:[UIFont systemFontOfSize:12.0f]];
        if ( font )
        {
-               if ( [self respondsToSelector:@selector(setFont:)] )
+                if ( [self respondsToSelector:@selector(setTitleFont:)] )
                {
-                       [self performSelector:@selector(setFont:) withObject:font];
+                       [self performSelector:@selector(setTitleFont:) withObject:font];
                }
-               else if ( [self respondsToSelector:@selector(setTitleFont:)] )
+        else if ( [self respondsToSelector:@selector(setFont:)] )
                {
-                       [self performSelector:@selector(setTitleFont:) withObject:font];
+                       [self performSelector:@selector(setFont:) withObject:font];
                }
        }

@@ -252,6 +252,7 @@
        [self applyButtonTitle:propertiesCopy];
        [self applyButtonColor:propertiesCopy];
        [self applyButtonInsets:propertiesCopy];
+      [self applyButtonContent:propertiesCopy];

        [super applyUIStyling:propertiesCopy];
 }

拼写错误

Bee_Singleton.h 里面的宏拼写错误,应该是 DEF_SINGLETON 而不是 DEF_SINGLETION.

xcode6 NSData+BeeExtension.mm报错

按照”Xcode6各种报错解决方案“修改后,编译还是报错:

NSData+BeeExtension.mm
97行:
return [NSData dataWithContentsOfFile:path];
报错:
Cannot initialize return object of type 'NSString *' with an rvalue of type 'NSData'

没事儿了。。。NSData换成NSString可以编译了。。。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.