Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 02-09-2012, 09:29 AM   #1 (permalink)
Registered Member
 
Join Date: Feb 2012
Posts: 1
iper07 is on a distinguished road
Default Problem with button on iphone app

Hello everyone,
I start to develop an application for iPhone and iPad and we are finding some difficult to build, on the home page of the application, buttons with irregular shapes.

My problem is that the buttons are connected to each other.

We found a way to make buttons with irregular shapes with the classes found on this site:

https://github.com/ole/OBShapedButton

But with this method we must split the image, with the risk that when we go to position images to reconstruct it is not properly displayed.

I'm asking you whether it is possible to visualize a single image and on this create two or more buttons, as is done in html with the map area.

I hope I explained myself, otherwise you will not hesitate to ask clarifications.

Thanks
iper07 is offline   Reply With Quote
Old 02-09-2012, 12:01 PM   #2 (permalink)
Use [code] tags please
 
Join Date: Jun 2009
Location: Jacksonville, FL
Posts: 410
timle8n1 is on a distinguished road
Default

You could make transparent buttons and put them and the image in a UIView with the buttons located where you want on the image. Make sure the button are on top of the image.
timle8n1 is offline   Reply With Quote
Old 02-09-2012, 12:09 PM   #3 (permalink)
Registered Member
 
Join Date: Dec 2010
Location: Seattle, WA
Posts: 408
RickSDK is on a distinguished road
Default

or simply use the touches began method:

Code:
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
	
	UITouch *touch = [[event allTouches] anyObject];
	CGPoint startTouchPosition = [touch locationInView:touch.view];
	if(startTouchPosition.x >= 15 
    && startTouchPosition.x <= 126 
    && startTouchPosition.y>=51 
    && startTouchPosition.y<=168) {
// do the work
}
__________________
Check out my apps

RickSDK is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 405
12 members and 393 guests
chiataytuday, chits12345, fiftysixty, gmarro, KennyChong, kilobytedump, Leslie80, Matrix23, Meoz, ryantcb, xerohuang, Yosh_K
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,670
Threads: 94,121
Posts: 402,903
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Yosh_K
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 04:25 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0