iOS Question my frist app

winjiadh

Active Member
Licensed User
Longtime User
when I used 1.4 test some,it's ok
when I download the 1.8
I test some old app, it's ok
I write a new ,like this
B4X:
'Code module
#Region  Project Attributes
    #ApplicationLabel: cards
    #Version: 1.0.0
    'Orientation possible values: Portrait, LandscapeLeft, LandscapeRight and PortraitUpsideDown
    #iPhoneOrientations: Portrait, LandscapeLeft, LandscapeRight
    #iPadOrientations: Portrait, LandscapeLeft, LandscapeRight, PortraitUpsideDown
#End Region

Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'Public variables can be accessed from all modules.
    Public App As Application
    Public NavControl As NavigationController
    Private Page1 As Page
    Dim bmpHand As Bitmap
End Sub

Private Sub Application_Start (Nav As NavigationController)
    NavControl = Nav
    Page1.Initialize("Page1")
    Page1.Title = "Page 1"
    Page1.RootPanel.Color = Colors.Black '.White
    NavControl.ShowPage(Page1)
    Page1.RootPanel.LoadLayout("suanpai")
End Sub

Private Sub Page1_Resize(Width As Int, Height As Int)
    For I = 0 To 9 'create 10 imageviews
        Dim btn As Button
        btn.Initialize ("Btn")
        bmpHand.Initialize( File.DirAssets ,I&"card.png")
        SetBackgroundImage(btn,bmpHand,0)
        Page1.RootPanel.AddView(btn, 0dip+10%x*I, 100%y-100dip, 15%x, 100dip)
    Next
End Sub

Private Sub Application_Background
   
End Sub
'state: 0 - normal, 1 - highlighted, 2 - disabled
Sub SetBackgroundImage(b As Button, bmp As Bitmap, state As Int)
Dim no As NativeObject = b
no.RunMethod("setBackgroundImage:forState:", Array(bmp, state))
End Sub

it's can't used
 

Attachments

  • cards.zip
    2.2 KB · Views: 209

winjiadh

Active Member
Licensed User
Longtime User
I run b4i-Bridge in iphone5, and click the b4i "run"
the iphone5,display like this
QQ图片20150428174948.jpg

I click the right button "安装" menes "setup"
but nothing in my iphone
 
Upvote 0

winjiadh

Active Member
Licensed User
Longtime User
And I restart my local MAC ,my IPhone5, and the computer used B4I programe
the Miracle happened
the app run is OK
but who can told me what happen?
who knows?
 
Upvote 0
Top